Guest User

Untitled

a guest
Apr 4th, 2016
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ! function(a) {
  2.     if ("object" == typeof exports && "undefined" != typeof module) module.exports = a();
  3.     else if ("function" == typeof define && define.amd) define([], a);
  4.     else {
  5.         var b;
  6.         b = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this, b.io = a()
  7.     }
  8. }(function() {
  9.     var a;
  10.     return function b(a, c, d) {
  11.         function e(g, h) {
  12.             if (!c[g]) {
  13.                 if (!a[g]) {
  14.                     var i = "function" == typeof require && require;
  15.                     if (!h && i) return i(g, !0);
  16.                     if (f) return f(g, !0);
  17.                     var j = new Error("Cannot find module '" + g + "'");
  18.                     throw j.code = "MODULE_NOT_FOUND", j
  19.                 }
  20.                 var k = c[g] = {
  21.                     exports: {}
  22.                 };
  23.                 a[g][0].call(k.exports, function(b) {
  24.                     var c = a[g][1][b];
  25.                     return e(c ? c : b)
  26.                 }, k, k.exports, b, a, c, d)
  27.             }
  28.             return c[g].exports
  29.         }
  30.         for (var f = "function" == typeof require && require, g = 0; g < d.length; g++) e(d[g]);
  31.         return e
  32.     }({
  33.         1: [function(a, b, c) {
  34.             b.exports = a("./lib/")
  35.         }, {
  36.             "./lib/": 2
  37.         }],
  38.         2: [function(a, b, c) {
  39.             b.exports = a("./socket"), b.exports.parser = a("engine.io-parser")
  40.         }, {
  41.             "./socket": 3,
  42.             "engine.io-parser": 19
  43.         }],
  44.         3: [function(a, b, c) {
  45.             (function(c) {
  46.                 function d(a, b) {
  47.                     if (!(this instanceof d)) return new d(a, b);
  48.                     b = b || {}, a && "object" == typeof a && (b = a, a = null), a ? (a = k(a), b.hostname = a.host, b.secure = "https" == a.protocol || "wss" == a.protocol, b.port = a.port, a.query && (b.query = a.query)) : b.host && (b.hostname = k(b.host).host), this.secure = null != b.secure ? b.secure : c.location && "https:" == location.protocol, b.hostname && !b.port && (b.port = this.secure ? "443" : "80"), this.agent = b.agent || !1, this.hostname = b.hostname || (c.location ? location.hostname : "localhost"), this.port = b.port || (c.location && location.port ? location.port : this.secure ? 443 : 80), this.query = b.query || {}, "string" == typeof this.query && (this.query = m.decode(this.query)), this.upgrade = !1 !== b.upgrade, this.path = (b.path || "/engine.io").replace(/\/$/, "") + "/", this.forceJSONP = !!b.forceJSONP, this.jsonp = !1 !== b.jsonp, this.forceBase64 = !!b.forceBase64, this.enablesXDR = !!b.enablesXDR, this.timestampParam = b.timestampParam || "t", this.timestampRequests = b.timestampRequests, this.transports = b.transports || ["polling", "websocket"], this.readyState = "", this.writeBuffer = [], this.policyPort = b.policyPort || 843, this.rememberUpgrade = b.rememberUpgrade || !1, this.binaryType = null, this.onlyBinaryUpgrades = b.onlyBinaryUpgrades, this.perMessageDeflate = !1 !== b.perMessageDeflate ? b.perMessageDeflate || {} : !1, !0 === this.perMessageDeflate && (this.perMessageDeflate = {}), this.perMessageDeflate && null == this.perMessageDeflate.threshold && (this.perMessageDeflate.threshold = 1024), this.pfx = b.pfx || null, this.key = b.key || null, this.passphrase = b.passphrase || null, this.cert = b.cert || null, this.ca = b.ca || null, this.ciphers = b.ciphers || null, this.rejectUnauthorized = void 0 === b.rejectUnauthorized ? null : b.rejectUnauthorized;
  49.                     var e = "object" == typeof c && c;
  50.                     e.global === e && b.extraHeaders && Object.keys(b.extraHeaders).length > 0 && (this.extraHeaders = b.extraHeaders), this.open()
  51.                 }
  52.  
  53.                 function e(a) {
  54.                     var b = {};
  55.                     for (var c in a) a.hasOwnProperty(c) && (b[c] = a[c]);
  56.                     return b
  57.                 }
  58.                 var f = a("./transports"),
  59.                     g = a("component-emitter"),
  60.                     h = a("debug")("engine.io-client:socket"),
  61.                     i = a("indexof"),
  62.                     j = a("engine.io-parser"),
  63.                     k = a("parseuri"),
  64.                     l = a("parsejson"),
  65.                     m = a("parseqs");
  66.                 b.exports = d, d.priorWebsocketSuccess = !1, g(d.prototype), d.protocol = j.protocol, d.Socket = d, d.Transport = a("./transport"), d.transports = a("./transports"), d.parser = a("engine.io-parser"), d.prototype.createTransport = function(a) {
  67.                     h('creating transport "%s"', a);
  68.                     var b = e(this.query);
  69.                     b.EIO = j.protocol, b.transport = a, this.id && (b.sid = this.id);
  70.                     var c = new f[a]({
  71.                         agent: this.agent,
  72.                         hostname: this.hostname,
  73.                         port: this.port,
  74.                         secure: this.secure,
  75.                         path: this.path,
  76.                         query: b,
  77.                         forceJSONP: this.forceJSONP,
  78.                         jsonp: this.jsonp,
  79.                         forceBase64: this.forceBase64,
  80.                         enablesXDR: this.enablesXDR,
  81.                         timestampRequests: this.timestampRequests,
  82.                         timestampParam: this.timestampParam,
  83.                         policyPort: this.policyPort,
  84.                         socket: this,
  85.                         pfx: this.pfx,
  86.                         key: this.key,
  87.                         passphrase: this.passphrase,
  88.                         cert: this.cert,
  89.                         ca: this.ca,
  90.                         ciphers: this.ciphers,
  91.                         rejectUnauthorized: this.rejectUnauthorized,
  92.                         perMessageDeflate: this.perMessageDeflate,
  93.                         extraHeaders: this.extraHeaders
  94.                     });
  95.                     return c
  96.                 }, d.prototype.open = function() {
  97.                     var a;
  98.                     if (this.rememberUpgrade && d.priorWebsocketSuccess && -1 != this.transports.indexOf("websocket")) a = "websocket";
  99.                     else {
  100.                         if (0 === this.transports.length) {
  101.                             var b = this;
  102.                             return void setTimeout(function() {
  103.                                 b.emit("error", "No transports available")
  104.                             }, 0)
  105.                         }
  106.                         a = this.transports[0]
  107.                     }
  108.                     this.readyState = "opening";
  109.                     try {
  110.                         a = this.createTransport(a)
  111.                     } catch (c) {
  112.                         return this.transports.shift(), void this.open()
  113.                     }
  114.                     a.open(), this.setTransport(a)
  115.                 }, d.prototype.setTransport = function(a) {
  116.                     h("setting transport %s", a.name);
  117.                     var b = this;
  118.                     this.transport && (h("clearing existing transport %s", this.transport.name), this.transport.removeAllListeners()), this.transport = a, a.on("drain", function() {
  119.                         b.onDrain()
  120.                     }).on("packet", function(a) {
  121.                         b.onPacket(a)
  122.                     }).on("error", function(a) {
  123.                         b.onError(a)
  124.                     }).on("close", function() {
  125.                         b.onClose("transport close")
  126.                     })
  127.                 }, d.prototype.probe = function(a) {
  128.                     function b() {
  129.                         if (m.onlyBinaryUpgrades) {
  130.                             var b = !this.supportsBinary && m.transport.supportsBinary;
  131.                             l = l || b
  132.                         }
  133.                         l || (h('probe transport "%s" opened', a), k.send([{
  134.                             type: "ping",
  135.                             data: "probe"
  136.                         }]), k.once("packet", function(b) {
  137.                             if (!l)
  138.                                 if ("pong" == b.type && "probe" == b.data) {
  139.                                     if (h('probe transport "%s" pong', a), m.upgrading = !0, m.emit("upgrading", k), !k) return;
  140.                                     d.priorWebsocketSuccess = "websocket" == k.name, h('pausing current transport "%s"', m.transport.name), m.transport.pause(function() {
  141.                                         l || "closed" != m.readyState && (h("changing transport and sending upgrade packet"), j(), m.setTransport(k), k.send([{
  142.                                             type: "upgrade"
  143.                                         }]), m.emit("upgrade", k), k = null, m.upgrading = !1, m.flush())
  144.                                     })
  145.                                 } else {
  146.                                     h('probe transport "%s" failed', a);
  147.                                     var c = new Error("probe error");
  148.                                     c.transport = k.name, m.emit("upgradeError", c)
  149.                                 }
  150.                         }))
  151.                     }
  152.  
  153.                     function c() {
  154.                         l || (l = !0, j(), k.close(), k = null)
  155.                     }
  156.  
  157.                     function e(b) {
  158.                         var d = new Error("probe error: " + b);
  159.                         d.transport = k.name, c(), h('probe transport "%s" failed because of error: %s', a, b), m.emit("upgradeError", d)
  160.                     }
  161.  
  162.                     function f() {
  163.                         e("transport closed")
  164.                     }
  165.  
  166.                     function g() {
  167.                         e("socket closed")
  168.                     }
  169.  
  170.                     function i(a) {
  171.                         k && a.name != k.name && (h('"%s" works - aborting "%s"', a.name, k.name), c())
  172.                     }
  173.  
  174.                     function j() {
  175.                         k.removeListener("open", b), k.removeListener("error", e), k.removeListener("close", f), m.removeListener("close", g), m.removeListener("upgrading", i)
  176.                     }
  177.                     h('probing transport "%s"', a);
  178.                     var k = this.createTransport(a, {
  179.                             probe: 1
  180.                         }),
  181.                         l = !1,
  182.                         m = this;
  183.                     d.priorWebsocketSuccess = !1, k.once("open", b), k.once("error", e), k.once("close", f), this.once("close", g), this.once("upgrading", i), k.open()
  184.                 }, d.prototype.onOpen = function() {
  185.                     if (h("socket open"), this.readyState = "open", d.priorWebsocketSuccess = "websocket" == this.transport.name, this.emit("open"), this.flush(), "open" == this.readyState && this.upgrade && this.transport.pause) {
  186.                         h("starting upgrade probes");
  187.                         for (var a = 0, b = this.upgrades.length; b > a; a++) this.probe(this.upgrades[a])
  188.                     }
  189.                 }, d.prototype.onPacket = function(a) {
  190.                     if ("opening" == this.readyState || "open" == this.readyState) switch (h('socket receive: type "%s", data "%s"', a.type, a.data), this.emit("packet", a), this.emit("heartbeat"), a.type) {
  191.                         case "open":
  192.                             this.onHandshake(l(a.data));
  193.                             break;
  194.                         case "pong":
  195.                             this.setPing(), this.emit("pong");
  196.                             break;
  197.                         case "error":
  198.                             var b = new Error("server error");
  199.                             b.code = a.data, this.onError(b);
  200.                             break;
  201.                         case "message":
  202.                             this.emit("data", a.data), this.emit("message", a.data)
  203.                     } else h('packet received with socket readyState "%s"', this.readyState)
  204.                 }, d.prototype.onHandshake = function(a) {
  205.                     this.emit("handshake", a), this.id = a.sid, this.transport.query.sid = a.sid, this.upgrades = this.filterUpgrades(a.upgrades), this.pingInterval = a.pingInterval, this.pingTimeout = a.pingTimeout, this.onOpen(), "closed" != this.readyState && (this.setPing(), this.removeListener("heartbeat", this.onHeartbeat), this.on("heartbeat", this.onHeartbeat))
  206.                 }, d.prototype.onHeartbeat = function(a) {
  207.                     clearTimeout(this.pingTimeoutTimer);
  208.                     var b = this;
  209.                     b.pingTimeoutTimer = setTimeout(function() {
  210.                         "closed" != b.readyState && b.onClose("ping timeout")
  211.                     }, a || b.pingInterval + b.pingTimeout)
  212.                 }, d.prototype.setPing = function() {
  213.                     var a = this;
  214.                     clearTimeout(a.pingIntervalTimer), a.pingIntervalTimer = setTimeout(function() {
  215.                         h("writing ping packet - expecting pong within %sms", a.pingTimeout), a.ping(), a.onHeartbeat(a.pingTimeout)
  216.                     }, a.pingInterval)
  217.                 }, d.prototype.ping = function() {
  218.                     var a = this;
  219.                     this.sendPacket("ping", function() {
  220.                         a.emit("ping")
  221.                     })
  222.                 }, d.prototype.onDrain = function() {
  223.                     this.writeBuffer.splice(0, this.prevBufferLen), this.prevBufferLen = 0, 0 === this.writeBuffer.length ? this.emit("drain") : this.flush()
  224.                 }, d.prototype.flush = function() {
  225.                     "closed" != this.readyState && this.transport.writable && !this.upgrading && this.writeBuffer.length && (h("flushing %d packets in socket", this.writeBuffer.length), this.transport.send(this.writeBuffer), this.prevBufferLen = this.writeBuffer.length, this.emit("flush"))
  226.                 }, d.prototype.write = d.prototype.send = function(a, b, c) {
  227.                     return this.sendPacket("message", a, b, c), this
  228.                 }, d.prototype.sendPacket = function(a, b, c, d) {
  229.                     if ("function" == typeof b && (d = b, b = void 0), "function" == typeof c && (d = c, c = null), "closing" != this.readyState && "closed" != this.readyState) {
  230.                         c = c || {}, c.compress = !1 !== c.compress;
  231.                         var e = {
  232.                             type: a,
  233.                             data: b,
  234.                             options: c
  235.                         };
  236.                         this.emit("packetCreate", e), this.writeBuffer.push(e), d && this.once("flush", d), this.flush()
  237.                     }
  238.                 }, d.prototype.close = function() {
  239.                     function a() {
  240.                         d.onClose("forced close"), h("socket closing - telling transport to close"), d.transport.close()
  241.                     }
  242.  
  243.                     function b() {
  244.                         d.removeListener("upgrade", b), d.removeListener("upgradeError", b), a()
  245.                     }
  246.  
  247.                     function c() {
  248.                         d.once("upgrade", b), d.once("upgradeError", b)
  249.                     }
  250.                     if ("opening" == this.readyState || "open" == this.readyState) {
  251.                         this.readyState = "closing";
  252.                         var d = this;
  253.                         this.writeBuffer.length ? this.once("drain", function() {
  254.                             this.upgrading ? c() : a()
  255.                         }) : this.upgrading ? c() : a()
  256.                     }
  257.                     return this
  258.                 }, d.prototype.onError = function(a) {
  259.                     h("socket error %j", a), d.priorWebsocketSuccess = !1, this.emit("error", a), this.onClose("transport error", a)
  260.                 }, d.prototype.onClose = function(a, b) {
  261.                     if ("opening" == this.readyState || "open" == this.readyState || "closing" == this.readyState) {
  262.                         h('socket close with reason: "%s"', a);
  263.                         var c = this;
  264.                         clearTimeout(this.pingIntervalTimer), clearTimeout(this.pingTimeoutTimer), this.transport.removeAllListeners("close"), this.transport.close(), this.transport.removeAllListeners(), this.readyState = "closed", this.id = null, this.emit("close", a, b), c.writeBuffer = [], c.prevBufferLen = 0
  265.                     }
  266.                 }, d.prototype.filterUpgrades = function(a) {
  267.                     for (var b = [], c = 0, d = a.length; d > c; c++) ~i(this.transports, a[c]) && b.push(a[c]);
  268.                     return b
  269.                 }
  270.             }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {})
  271.         }, {
  272.             "./transport": 4,
  273.             "./transports": 5,
  274.             "component-emitter": 15,
  275.             debug: 17,
  276.             "engine.io-parser": 19,
  277.             indexof: 23,
  278.             parsejson: 26,
  279.             parseqs: 27,
  280.             parseuri: 28
  281.         }],
  282.         4: [function(a, b, c) {
  283.             function d(a) {
  284.                 this.path = a.path, this.hostname = a.hostname, this.port = a.port, this.secure = a.secure, this.query = a.query, this.timestampParam = a.timestampParam, this.timestampRequests = a.timestampRequests, this.readyState = "", this.agent = a.agent || !1, this.socket = a.socket, this.enablesXDR = a.enablesXDR, this.pfx = a.pfx, this.key = a.key, this.passphrase = a.passphrase, this.cert = a.cert, this.ca = a.ca, this.ciphers = a.ciphers, this.rejectUnauthorized = a.rejectUnauthorized, this.extraHeaders = a.extraHeaders
  285.             }
  286.             var e = a("engine.io-parser"),
  287.                 f = a("component-emitter");
  288.             b.exports = d, f(d.prototype), d.prototype.onError = function(a, b) {
  289.                 var c = new Error(a);
  290.                 return c.type = "TransportError", c.description = b, this.emit("error", c), this
  291.             }, d.prototype.open = function() {
  292.                 return ("closed" == this.readyState || "" == this.readyState) && (this.readyState = "opening", this.doOpen()), this
  293.             }, d.prototype.close = function() {
  294.                 return ("opening" == this.readyState || "open" == this.readyState) && (this.doClose(), this.onClose()), this
  295.             }, d.prototype.send = function(a) {
  296.                 if ("open" != this.readyState) throw new Error("Transport not open");
  297.                 this.write(a)
  298.             }, d.prototype.onOpen = function() {
  299.                 this.readyState = "open", this.writable = !0, this.emit("open")
  300.             }, d.prototype.onData = function(a) {
  301.                 var b = e.decodePacket(a, this.socket.binaryType);
  302.                 this.onPacket(b)
  303.             }, d.prototype.onPacket = function(a) {
  304.                 this.emit("packet", a)
  305.             }, d.prototype.onClose = function() {
  306.                 this.readyState = "closed", this.emit("close")
  307.             }
  308.         }, {
  309.             "component-emitter": 15,
  310.             "engine.io-parser": 19
  311.         }],
  312.         5: [function(a, b, c) {
  313.             (function(b) {
  314.                 function d(a) {
  315.                     var c, d = !1,
  316.                         h = !1,
  317.                         i = !1 !== a.jsonp;
  318.                     if (b.location) {
  319.                         var j = "https:" == location.protocol,
  320.                             k = location.port;
  321.                         k || (k = j ? 443 : 80), d = a.hostname != location.hostname || k != a.port, h = a.secure != j
  322.                     }
  323.                     if (a.xdomain = d, a.xscheme = h, c = new e(a), "open" in c && !a.forceJSONP) return new f(a);
  324.                     if (!i) throw new Error("JSONP disabled");
  325.                     return new g(a)
  326.                 }
  327.                 var e = a("xmlhttprequest-ssl"),
  328.                     f = a("./polling-xhr"),
  329.                     g = a("./polling-jsonp"),
  330.                     h = a("./websocket");
  331.                 c.polling = d, c.websocket = h
  332.             }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {})
  333.         }, {
  334.             "./polling-jsonp": 6,
  335.             "./polling-xhr": 7,
  336.             "./websocket": 9,
  337.             "xmlhttprequest-ssl": 10
  338.         }],
  339.         6: [function(a, b, c) {
  340.             (function(c) {
  341.                 function d() {}
  342.  
  343.                 function e(a) {
  344.                     f.call(this, a), this.query = this.query || {}, h || (c.___eio || (c.___eio = []), h = c.___eio), this.index = h.length;
  345.                     var b = this;
  346.                     h.push(function(a) {
  347.                         b.onData(a)
  348.                     }), this.query.j = this.index, c.document && c.addEventListener && c.addEventListener("beforeunload", function() {
  349.                         b.script && (b.script.onerror = d)
  350.                     }, !1)
  351.                 }
  352.                 var f = a("./polling"),
  353.                     g = a("component-inherit");
  354.                 b.exports = e;
  355.                 var h, i = /\n/g,
  356.                     j = /\\n/g;
  357.                 g(e, f), e.prototype.supportsBinary = !1, e.prototype.doClose = function() {
  358.                     this.script && (this.script.parentNode.removeChild(this.script), this.script = null), this.form && (this.form.parentNode.removeChild(this.form), this.form = null, this.iframe = null), f.prototype.doClose.call(this)
  359.                 }, e.prototype.doPoll = function() {
  360.                     var a = this,
  361.                         b = document.createElement("script");
  362.                     this.script && (this.script.parentNode.removeChild(this.script), this.script = null), b.async = !0, b.src = this.uri(), b.onerror = function(b) {
  363.                         a.onError("jsonp poll error", b)
  364.                     };
  365.                     var c = document.getElementsByTagName("script")[0];
  366.                     c ? c.parentNode.insertBefore(b, c) : (document.head || document.body).appendChild(b), this.script = b;
  367.                     var d = "undefined" != typeof navigator && /gecko/i.test(navigator.userAgent);
  368.                     d && setTimeout(function() {
  369.                         var a = document.createElement("iframe");
  370.                         document.body.appendChild(a), document.body.removeChild(a)
  371.                     }, 100)
  372.                 }, e.prototype.doWrite = function(a, b) {
  373.                     function c() {
  374.                         d(), b()
  375.                     }
  376.  
  377.                     function d() {
  378.                         if (e.iframe) try {
  379.                             e.form.removeChild(e.iframe)
  380.                         } catch (a) {
  381.                             e.onError("jsonp polling iframe removal error", a)
  382.                         }
  383.                         try {
  384.                             var b = '<iframe src="javascript:0" name="' + e.iframeId + '">';
  385.                             f = document.createElement(b)
  386.                         } catch (a) {
  387.                             f = document.createElement("iframe"), f.name = e.iframeId, f.src = "javascript:0"
  388.                         }
  389.                         f.id = e.iframeId, e.form.appendChild(f), e.iframe = f
  390.                     }
  391.                     var e = this;
  392.                     if (!this.form) {
  393.                         var f, g = document.createElement("form"),
  394.                             h = document.createElement("textarea"),
  395.                             k = this.iframeId = "eio_iframe_" + this.index;
  396.                         g.className = "socketio", g.style.position = "absolute", g.style.top = "-1000px", g.style.left = "-1000px", g.target = k, g.method = "POST", g.setAttribute("accept-charset", "utf-8"), h.name = "d", g.appendChild(h), document.body.appendChild(g), this.form = g, this.area = h
  397.                     }
  398.                     this.form.action = this.uri(), d(), a = a.replace(j, "\\\n"), this.area.value = a.replace(i, "\\n");
  399.                     try {
  400.                         this.form.submit()
  401.                     } catch (l) {}
  402.                     this.iframe.attachEvent ? this.iframe.onreadystatechange = function() {
  403.                         "complete" == e.iframe.readyState && c()
  404.                     } : this.iframe.onload = c
  405.                 }
  406.             }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {})
  407.         }, {
  408.             "./polling": 8,
  409.             "component-inherit": 16
  410.         }],
  411.         7: [function(a, b, c) {
  412.             (function(c) {
  413.                 function d() {}
  414.  
  415.                 function e(a) {
  416.                     if (i.call(this, a), c.location) {
  417.                         var b = "https:" == location.protocol,
  418.                             d = location.port;
  419.                         d || (d = b ? 443 : 80), this.xd = a.hostname != c.location.hostname || d != a.port, this.xs = a.secure != b
  420.                     } else this.extraHeaders = a.extraHeaders
  421.                 }
  422.  
  423.                 function f(a) {
  424.                     this.method = a.method || "GET", this.uri = a.uri, this.xd = !!a.xd, this.xs = !!a.xs, this.async = !1 !== a.async, this.data = void 0 != a.data ? a.data : null, this.agent = a.agent, this.isBinary = a.isBinary, this.supportsBinary = a.supportsBinary, this.enablesXDR = a.enablesXDR, this.pfx = a.pfx, this.key = a.key, this.passphrase = a.passphrase, this.cert = a.cert, this.ca = a.ca, this.ciphers = a.ciphers, this.rejectUnauthorized = a.rejectUnauthorized, this.extraHeaders = a.extraHeaders, this.create()
  425.                 }
  426.  
  427.                 function g() {
  428.                     for (var a in f.requests) f.requests.hasOwnProperty(a) && f.requests[a].abort()
  429.                 }
  430.                 var h = a("xmlhttprequest-ssl"),
  431.                     i = a("./polling"),
  432.                     j = a("component-emitter"),
  433.                     k = a("component-inherit"),
  434.                     l = a("debug")("engine.io-client:polling-xhr");
  435.                 b.exports = e, b.exports.Request = f, k(e, i), e.prototype.supportsBinary = !0, e.prototype.request = function(a) {
  436.                     return a = a || {}, a.uri = this.uri(), a.xd = this.xd, a.xs = this.xs, a.agent = this.agent || !1, a.supportsBinary = this.supportsBinary, a.enablesXDR = this.enablesXDR, a.pfx = this.pfx, a.key = this.key, a.passphrase = this.passphrase, a.cert = this.cert, a.ca = this.ca, a.ciphers = this.ciphers, a.rejectUnauthorized = this.rejectUnauthorized, a.extraHeaders = this.extraHeaders, new f(a)
  437.                 }, e.prototype.doWrite = function(a, b) {
  438.                     var c = "string" != typeof a && void 0 !== a,
  439.                         d = this.request({
  440.                             method: "POST",
  441.                             data: a,
  442.                             isBinary: c
  443.                         }),
  444.                         e = this;
  445.                     d.on("success", b), d.on("error", function(a) {
  446.                         e.onError("xhr post error", a)
  447.                     }), this.sendXhr = d
  448.                 }, e.prototype.doPoll = function() {
  449.                     l("xhr poll");
  450.                     var a = this.request(),
  451.                         b = this;
  452.                     a.on("data", function(a) {
  453.                         b.onData(a)
  454.                     }), a.on("error", function(a) {
  455.                         b.onError("xhr poll error", a)
  456.                     }), this.pollXhr = a
  457.                 }, j(f.prototype), f.prototype.create = function() {
  458.                     var a = {
  459.                         agent: this.agent,
  460.                         xdomain: this.xd,
  461.                         xscheme: this.xs,
  462.                         enablesXDR: this.enablesXDR
  463.                     };
  464.                     a.pfx = this.pfx, a.key = this.key, a.passphrase = this.passphrase, a.cert = this.cert, a.ca = this.ca, a.ciphers = this.ciphers, a.rejectUnauthorized = this.rejectUnauthorized;
  465.                     var b = this.xhr = new h(a),
  466.                         d = this;
  467.                     try {
  468.                         l("xhr open %s: %s", this.method, this.uri), b.open(this.method, this.uri, this.async);
  469.                         try {
  470.                             if (this.extraHeaders) {
  471.                                 b.setDisableHeaderCheck(!0);
  472.                                 for (var e in this.extraHeaders) this.extraHeaders.hasOwnProperty(e) && b.setRequestHeader(e, this.extraHeaders[e])
  473.                             }
  474.                         } catch (g) {}
  475.                         if (this.supportsBinary && (b.responseType = "arraybuffer"), "POST" == this.method) try {
  476.                             this.isBinary ? b.setRequestHeader("Content-type", "application/octet-stream") : b.setRequestHeader("Content-type", "text/plain;charset=UTF-8")
  477.                         } catch (g) {}
  478.                         "withCredentials" in b && (b.withCredentials = !0), this.hasXDR() ? (b.onload = function() {
  479.                             d.onLoad()
  480.                         }, b.onerror = function() {
  481.                             d.onError(b.responseText)
  482.                         }) : b.onreadystatechange = function() {
  483.                             4 == b.readyState && (200 == b.status || 1223 == b.status ? d.onLoad() : setTimeout(function() {
  484.                                 d.onError(b.status)
  485.                             }, 0))
  486.                         }, l("xhr data %s", this.data), b.send(this.data)
  487.                     } catch (g) {
  488.                         return void setTimeout(function() {
  489.                             d.onError(g)
  490.                         }, 0)
  491.                     }
  492.                     c.document && (this.index = f.requestsCount++, f.requests[this.index] = this)
  493.                 }, f.prototype.onSuccess = function() {
  494.                     this.emit("success"), this.cleanup()
  495.                 }, f.prototype.onData = function(a) {
  496.                     this.emit("data", a), this.onSuccess()
  497.                 }, f.prototype.onError = function(a) {
  498.                     this.emit("error", a), this.cleanup(!0)
  499.                 }, f.prototype.cleanup = function(a) {
  500.                     if ("undefined" != typeof this.xhr && null !== this.xhr) {
  501.                         if (this.hasXDR() ? this.xhr.onload = this.xhr.onerror = d : this.xhr.onreadystatechange = d, a) try {
  502.                             this.xhr.abort()
  503.                         } catch (b) {}
  504.                         c.document && delete f.requests[this.index], this.xhr = null
  505.                     }
  506.                 }, f.prototype.onLoad = function() {
  507.                     var a;
  508.                     try {
  509.                         var b;
  510.                         try {
  511.                             b = this.xhr.getResponseHeader("Content-Type").split(";")[0]
  512.                         } catch (c) {}
  513.                         if ("application/octet-stream" === b) a = this.xhr.response;
  514.                         else if (this.supportsBinary) try {
  515.                             a = String.fromCharCode.apply(null, new Uint8Array(this.xhr.response))
  516.                         } catch (c) {
  517.                             for (var d = new Uint8Array(this.xhr.response), e = [], f = 0, g = d.length; g > f; f++) e.push(d[f]);
  518.                             a = String.fromCharCode.apply(null, e)
  519.                         } else a = this.xhr.responseText
  520.                     } catch (c) {
  521.                         this.onError(c)
  522.                     }
  523.                     null != a && this.onData(a)
  524.                 }, f.prototype.hasXDR = function() {
  525.                     return "undefined" != typeof c.XDomainRequest && !this.xs && this.enablesXDR
  526.                 }, f.prototype.abort = function() {
  527.                     this.cleanup()
  528.                 }, c.document && (f.requestsCount = 0, f.requests = {}, c.attachEvent ? c.attachEvent("onunload", g) : c.addEventListener && c.addEventListener("beforeunload", g, !1))
  529.             }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {})
  530.         }, {
  531.             "./polling": 8,
  532.             "component-emitter": 15,
  533.             "component-inherit": 16,
  534.             debug: 17,
  535.             "xmlhttprequest-ssl": 10
  536.         }],
  537.         8: [function(a, b, c) {
  538.             function d(a) {
  539.                 var b = a && a.forceBase64;
  540.                 (!k || b) && (this.supportsBinary = !1), e.call(this, a)
  541.             }
  542.             var e = a("../transport"),
  543.                 f = a("parseqs"),
  544.                 g = a("engine.io-parser"),
  545.                 h = a("component-inherit"),
  546.                 i = a("yeast"),
  547.                 j = a("debug")("engine.io-client:polling");
  548.             b.exports = d;
  549.             var k = function() {
  550.                 var b = a("xmlhttprequest-ssl"),
  551.                     c = new b({
  552.                         xdomain: !1
  553.                     });
  554.                 return null != c.responseType
  555.             }();
  556.             h(d, e), d.prototype.name = "polling", d.prototype.doOpen = function() {
  557.                 this.poll()
  558.             }, d.prototype.pause = function(a) {
  559.                 function b() {
  560.                     j("paused"), c.readyState = "paused", a()
  561.                 }
  562.                 var c = this;
  563.                 if (this.readyState = "pausing", this.polling || !this.writable) {
  564.                     var d = 0;
  565.                     this.polling && (j("we are currently polling - waiting to pause"), d++, this.once("pollComplete", function() {
  566.                         j("pre-pause polling complete"), --d || b()
  567.                     })), this.writable || (j("we are currently writing - waiting to pause"), d++, this.once("drain", function() {
  568.                         j("pre-pause writing complete"), --d || b()
  569.                     }))
  570.                 } else b()
  571.             }, d.prototype.poll = function() {
  572.                 j("polling"), this.polling = !0, this.doPoll(), this.emit("poll")
  573.             }, d.prototype.onData = function(a) {
  574.                 var b = this;
  575.                 j("polling got data %s", a);
  576.                 var c = function(a, c, d) {
  577.                     return "opening" == b.readyState && b.onOpen(), "close" == a.type ? (b.onClose(), !1) : void b.onPacket(a)
  578.                 };
  579.                 g.decodePayload(a, this.socket.binaryType, c), "closed" != this.readyState && (this.polling = !1, this.emit("pollComplete"), "open" == this.readyState ? this.poll() : j('ignoring poll - transport state "%s"', this.readyState))
  580.             }, d.prototype.doClose = function() {
  581.                 function a() {
  582.                     j("writing close packet"), b.write([{
  583.                         type: "close"
  584.                     }])
  585.                 }
  586.                 var b = this;
  587.                 "open" == this.readyState ? (j("transport open - closing"), a()) : (j("transport not open - deferring close"), this.once("open", a))
  588.             }, d.prototype.write = function(a) {
  589.                 var b = this;
  590.                 this.writable = !1;
  591.                 var c = function() {
  592.                         b.writable = !0, b.emit("drain")
  593.                     },
  594.                     b = this;
  595.                 g.encodePayload(a, this.supportsBinary, function(a) {
  596.                     b.doWrite(a, c)
  597.                 })
  598.             }, d.prototype.uri = function() {
  599.                 var a = this.query || {},
  600.                     b = this.secure ? "https" : "http",
  601.                     c = "";
  602.                 !1 !== this.timestampRequests && (a[this.timestampParam] = i()), this.supportsBinary || a.sid || (a.b64 = 1), a = f.encode(a), this.port && ("https" == b && 443 != this.port || "http" == b && 80 != this.port) && (c = ":" + this.port), a.length && (a = "?" + a);
  603.                 var d = -1 !== this.hostname.indexOf(":");
  604.                 return b + "://" + (d ? "[" + this.hostname + "]" : this.hostname) + c + this.path + a
  605.             }
  606.         }, {
  607.             "../transport": 4,
  608.             "component-inherit": 16,
  609.             debug: 17,
  610.             "engine.io-parser": 19,
  611.             parseqs: 27,
  612.             "xmlhttprequest-ssl": 10,
  613.             yeast: 30
  614.         }],
  615.         9: [function(a, b, c) {
  616.             (function(c) {
  617.                 function d(a) {
  618.                     var b = a && a.forceBase64;
  619.                     b && (this.supportsBinary = !1), this.perMessageDeflate = a.perMessageDeflate, e.call(this, a)
  620.                 }
  621.                 var e = a("../transport"),
  622.                     f = a("engine.io-parser"),
  623.                     g = a("parseqs"),
  624.                     h = a("component-inherit"),
  625.                     i = a("yeast"),
  626.                     j = a("debug")("engine.io-client:websocket"),
  627.                     k = c.WebSocket || c.MozWebSocket,
  628.                     l = k;
  629.                 if (!l && "undefined" == typeof window) try {
  630.                     l = a("ws")
  631.                 } catch (m) {}
  632.                 b.exports = d, h(d, e), d.prototype.name = "websocket", d.prototype.supportsBinary = !0, d.prototype.doOpen = function() {
  633.                     if (this.check()) {
  634.                         var a = this.uri(),
  635.                             b = void 0,
  636.                             c = {
  637.                                 agent: this.agent,
  638.                                 perMessageDeflate: this.perMessageDeflate
  639.                             };
  640.                         c.pfx = this.pfx, c.key = this.key, c.passphrase = this.passphrase, c.cert = this.cert, c.ca = this.ca, c.ciphers = this.ciphers, c.rejectUnauthorized = this.rejectUnauthorized, this.extraHeaders && (c.headers = this.extraHeaders), this.ws = k ? new l(a) : new l(a, b, c), void 0 === this.ws.binaryType && (this.supportsBinary = !1), this.ws.supports && this.ws.supports.binary ? (this.supportsBinary = !0, this.ws.binaryType = "buffer") : this.ws.binaryType = "arraybuffer", this.addEventListeners()
  641.                     }
  642.                 }, d.prototype.addEventListeners = function() {
  643.                     var a = this;
  644.                     this.ws.onopen = function() {
  645.                         a.onOpen()
  646.                     }, this.ws.onclose = function() {
  647.                         a.onClose()
  648.                     }, this.ws.onmessage = function(b) {
  649.                         a.onData(b.data)
  650.                     }, this.ws.onerror = function(b) {
  651.                         a.onError("websocket error", b)
  652.                     }
  653.                 }, "undefined" != typeof navigator && /iPad|iPhone|iPod/i.test(navigator.userAgent) && (d.prototype.onData = function(a) {
  654.                     var b = this;
  655.                     setTimeout(function() {
  656.                         e.prototype.onData.call(b, a)
  657.                     }, 0)
  658.                 }), d.prototype.write = function(a) {
  659.                     function b() {
  660.                         d.emit("flush"), setTimeout(function() {
  661.                             d.writable = !0, d.emit("drain")
  662.                         }, 0)
  663.                     }
  664.                     var d = this;
  665.                     this.writable = !1;
  666.                     for (var e = a.length, g = 0, h = e; h > g; g++) ! function(a) {
  667.                         f.encodePacket(a, d.supportsBinary, function(f) {
  668.                             if (!k) {
  669.                                 var g = {};
  670.                                 if (a.options && (g.compress = a.options.compress), d.perMessageDeflate) {
  671.                                     var h = "string" == typeof f ? c.Buffer.byteLength(f) : f.length;
  672.                                     h < d.perMessageDeflate.threshold && (g.compress = !1)
  673.                                 }
  674.                             }
  675.                             try {
  676.                                 k ? d.ws.send(f) : d.ws.send(f, g)
  677.                             } catch (i) {
  678.                                 j("websocket closed before onclose event")
  679.                             }--e || b()
  680.                         })
  681.                     }(a[g])
  682.                 }, d.prototype.onClose = function() {
  683.                     e.prototype.onClose.call(this)
  684.                 }, d.prototype.doClose = function() {
  685.                     "undefined" != typeof this.ws && this.ws.close()
  686.                 }, d.prototype.uri = function() {
  687.                     var a = this.query || {},
  688.                         b = this.secure ? "wss" : "ws",
  689.                         c = "";
  690.                     this.port && ("wss" == b && 443 != this.port || "ws" == b && 80 != this.port) && (c = ":" + this.port), this.timestampRequests && (a[this.timestampParam] = i()), this.supportsBinary || (a.b64 = 1), a = g.encode(a), a.length && (a = "?" + a);
  691.                     var d = -1 !== this.hostname.indexOf(":");
  692.                     return b + "://" + (d ? "[" + this.hostname + "]" : this.hostname) + c + this.path + a
  693.                 }, d.prototype.check = function() {
  694.                     return !(!l || "__initialize" in l && this.name === d.prototype.name)
  695.                 }
  696.             }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {})
  697.         }, {
  698.             "../transport": 4,
  699.             "component-inherit": 16,
  700.             debug: 17,
  701.             "engine.io-parser": 19,
  702.             parseqs: 27,
  703.             ws: void 0,
  704.             yeast: 30
  705.         }],
  706.         10: [function(a, b, c) {
  707.             var d = a("has-cors");
  708.             b.exports = function(a) {
  709.                 var b = a.xdomain,
  710.                     c = a.xscheme,
  711.                     e = a.enablesXDR;
  712.                 try {
  713.                     if ("undefined" != typeof XMLHttpRequest && (!b || d)) return new XMLHttpRequest
  714.                 } catch (f) {}
  715.                 try {
  716.                     if ("undefined" != typeof XDomainRequest && !c && e) return new XDomainRequest
  717.                 } catch (f) {}
  718.                 if (!b) try {
  719.                     return new ActiveXObject("Microsoft.XMLHTTP")
  720.                 } catch (f) {}
  721.             }
  722.         }, {
  723.             "has-cors": 22
  724.         }],
  725.         11: [function(a, b, c) {
  726.             function d(a, b, c) {
  727.                 function d(a, e) {
  728.                     if (d.count <= 0) throw new Error("after called too many times");
  729.                     --d.count, a ? (f = !0, b(a), b = c) : 0 !== d.count || f || b(null, e)
  730.                 }
  731.                 var f = !1;
  732.                 return c = c || e, d.count = a, 0 === a ? b() : d
  733.             }
  734.  
  735.             function e() {}
  736.             b.exports = d
  737.         }, {}],
  738.         12: [function(a, b, c) {
  739.             b.exports = function(a, b, c) {
  740.                 var d = a.byteLength;
  741.                 if (b = b || 0, c = c || d, a.slice) return a.slice(b, c);
  742.                 if (0 > b && (b += d), 0 > c && (c += d), c > d && (c = d), b >= d || b >= c || 0 === d) return new ArrayBuffer(0);
  743.                 for (var e = new Uint8Array(a), f = new Uint8Array(c - b), g = b, h = 0; c > g; g++, h++) f[h] = e[g];
  744.                 return f.buffer
  745.             }
  746.         }, {}],
  747.         13: [function(a, b, c) {
  748.             ! function(a) {
  749.                 "use strict";
  750.                 c.encode = function(b) {
  751.                     var c, d = new Uint8Array(b),
  752.                         e = d.length,
  753.                         f = "";
  754.                     for (c = 0; e > c; c += 3) f += a[d[c] >> 2], f += a[(3 & d[c]) << 4 | d[c + 1] >> 4], f += a[(15 & d[c + 1]) << 2 | d[c + 2] >> 6], f += a[63 & d[c + 2]];
  755.                     return e % 3 === 2 ? f = f.substring(0, f.length - 1) + "=" : e % 3 === 1 && (f = f.substring(0, f.length - 2) + "=="), f
  756.                 }, c.decode = function(b) {
  757.                     var c, d, e, f, g, h = .75 * b.length,
  758.                         i = b.length,
  759.                         j = 0;
  760.                     "=" === b[b.length - 1] && (h--, "=" === b[b.length - 2] && h--);
  761.                     var k = new ArrayBuffer(h),
  762.                         l = new Uint8Array(k);
  763.                     for (c = 0; i > c; c += 4) d = a.indexOf(b[c]), e = a.indexOf(b[c + 1]), f = a.indexOf(b[c + 2]), g = a.indexOf(b[c + 3]), l[j++] = d << 2 | e >> 4, l[j++] = (15 & e) << 4 | f >> 2, l[j++] = (3 & f) << 6 | 63 & g;
  764.                     return k
  765.                 }
  766.             }("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")
  767.         }, {}],
  768.         14: [function(a, b, c) {
  769.             (function(a) {
  770.                 function c(a) {
  771.                     for (var b = 0; b < a.length; b++) {
  772.                         var c = a[b];
  773.                         if (c.buffer instanceof ArrayBuffer) {
  774.                             var d = c.buffer;
  775.                             if (c.byteLength !== d.byteLength) {
  776.                                 var e = new Uint8Array(c.byteLength);
  777.                                 e.set(new Uint8Array(d, c.byteOffset, c.byteLength)), d = e.buffer
  778.                             }
  779.                             a[b] = d
  780.                         }
  781.                     }
  782.                 }
  783.  
  784.                 function d(a, b) {
  785.                     b = b || {};
  786.                     var d = new f;
  787.                     c(a);
  788.                     for (var e = 0; e < a.length; e++) d.append(a[e]);
  789.                     return b.type ? d.getBlob(b.type) : d.getBlob()
  790.                 }
  791.  
  792.                 function e(a, b) {
  793.                     return c(a), new Blob(a, b || {})
  794.                 }
  795.                 var f = a.BlobBuilder || a.WebKitBlobBuilder || a.MSBlobBuilder || a.MozBlobBuilder,
  796.                     g = function() {
  797.                         try {
  798.                             var a = new Blob(["hi"]);
  799.                             return 2 === a.size
  800.                         } catch (b) {
  801.                             return !1
  802.                         }
  803.                     }(),
  804.                     h = g && function() {
  805.                         try {
  806.                             var a = new Blob([new Uint8Array([1, 2])]);
  807.                             return 2 === a.size
  808.                         } catch (b) {
  809.                             return !1
  810.                         }
  811.                     }(),
  812.                     i = f && f.prototype.append && f.prototype.getBlob;
  813.                 b.exports = function() {
  814.                     return g ? h ? a.Blob : e : i ? d : void 0
  815.                 }()
  816.             }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {})
  817.         }, {}],
  818.         15: [function(a, b, c) {
  819.             function d(a) {
  820.                 return a ? e(a) : void 0
  821.             }
  822.  
  823.             function e(a) {
  824.                 for (var b in d.prototype) a[b] = d.prototype[b];
  825.                 return a
  826.             }
  827.             b.exports = d, d.prototype.on = d.prototype.addEventListener = function(a, b) {
  828.                 return this._callbacks = this._callbacks || {}, (this._callbacks[a] = this._callbacks[a] || []).push(b), this
  829.             }, d.prototype.once = function(a, b) {
  830.                 function c() {
  831.                     d.off(a, c), b.apply(this, arguments)
  832.                 }
  833.                 var d = this;
  834.                 return this._callbacks = this._callbacks || {}, c.fn = b, this.on(a, c), this
  835.             }, d.prototype.off = d.prototype.removeListener = d.prototype.removeAllListeners = d.prototype.removeEventListener = function(a, b) {
  836.                 if (this._callbacks = this._callbacks || {}, 0 == arguments.length) return this._callbacks = {}, this;
  837.                 var c = this._callbacks[a];
  838.                 if (!c) return this;
  839.                 if (1 == arguments.length) return delete this._callbacks[a], this;
  840.                 for (var d, e = 0; e < c.length; e++)
  841.                     if (d = c[e], d === b || d.fn === b) {
  842.                         c.splice(e, 1);
  843.                         break
  844.                     }
  845.                 return this
  846.             }, d.prototype.emit = function(a) {
  847.                 this._callbacks = this._callbacks || {};
  848.                 var b = [].slice.call(arguments, 1),
  849.                     c = this._callbacks[a];
  850.                 if (c) {
  851.                     c = c.slice(0);
  852.                     for (var d = 0, e = c.length; e > d; ++d) c[d].apply(this, b)
  853.                 }
  854.                 return this
  855.             }, d.prototype.listeners = function(a) {
  856.                 return this._callbacks = this._callbacks || {}, this._callbacks[a] || []
  857.             }, d.prototype.hasListeners = function(a) {
  858.                 return !!this.listeners(a).length
  859.             }
  860.         }, {}],
  861.         16: [function(a, b, c) {
  862.             b.exports = function(a, b) {
  863.                 var c = function() {};
  864.                 c.prototype = b.prototype, a.prototype = new c, a.prototype.constructor = a
  865.             }
  866.         }, {}],
  867.         17: [function(a, b, c) {
  868.             function d() {
  869.                 return "WebkitAppearance" in document.documentElement.style || window.console && (console.firebug || console.exception && console.table) || navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31
  870.             }
  871.  
  872.             function e() {
  873.                 var a = arguments,
  874.                     b = this.useColors;
  875.                 if (a[0] = (b ? "%c" : "") + this.namespace + (b ? " %c" : " ") + a[0] + (b ? "%c " : " ") + "+" + c.humanize(this.diff), !b) return a;
  876.                 var d = "color: " + this.color;
  877.                 a = [a[0], d, "color: inherit"].concat(Array.prototype.slice.call(a, 1));
  878.                 var e = 0,
  879.                     f = 0;
  880.                 return a[0].replace(/%[a-z%]/g, function(a) {
  881.                     "%%" !== a && (e++, "%c" === a && (f = e))
  882.                 }), a.splice(f, 0, d), a
  883.             }
  884.  
  885.             function f() {
  886.                 return "object" == typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments)
  887.             }
  888.  
  889.             function g(a) {
  890.                 try {
  891.                     null == a ? c.storage.removeItem("debug") : c.storage.debug = a
  892.                 } catch (b) {}
  893.             }
  894.  
  895.             function h() {
  896.                 var a;
  897.                 try {
  898.                     a = c.storage.debug
  899.                 } catch (b) {}
  900.                 return a
  901.             }
  902.  
  903.             function i() {
  904.                 try {
  905.                     return window.localStorage
  906.                 } catch (a) {}
  907.             }
  908.             c = b.exports = a("./debug"), c.log = f, c.formatArgs = e, c.save = g, c.load = h, c.useColors = d, c.storage = "undefined" != typeof chrome && "undefined" != typeof chrome.storage ? chrome.storage.local : i(), c.colors = ["lightseagreen", "forestgreen", "goldenrod", "dodgerblue", "darkorchid", "crimson"], c.formatters.j = function(a) {
  909.                 return JSON.stringify(a)
  910.             }, c.enable(h())
  911.         }, {
  912.             "./debug": 18
  913.         }],
  914.         18: [function(a, b, c) {
  915.             function d() {
  916.                 return c.colors[k++ % c.colors.length]
  917.             }
  918.  
  919.             function e(a) {
  920.                 function b() {}
  921.  
  922.                 function e() {
  923.                     var a = e,
  924.                         b = +new Date,
  925.                         f = b - (j || b);
  926.                     a.diff = f, a.prev = j, a.curr = b, j = b, null == a.useColors && (a.useColors = c.useColors()), null == a.color && a.useColors && (a.color = d());
  927.                     var g = Array.prototype.slice.call(arguments);
  928.                     g[0] = c.coerce(g[0]), "string" != typeof g[0] && (g = ["%o"].concat(g));
  929.                     var h = 0;
  930.                     g[0] = g[0].replace(/%([a-z%])/g, function(b, d) {
  931.                         if ("%%" === b) return b;
  932.                         h++;
  933.                         var e = c.formatters[d];
  934.                         if ("function" == typeof e) {
  935.                             var f = g[h];
  936.                             b = e.call(a, f), g.splice(h, 1), h--
  937.                         }
  938.                         return b
  939.                     }), "function" == typeof c.formatArgs && (g = c.formatArgs.apply(a, g));
  940.                     var i = e.log || c.log || console.log.bind(console);
  941.                     i.apply(a, g)
  942.                 }
  943.                 b.enabled = !1, e.enabled = !0;
  944.                 var f = c.enabled(a) ? e : b;
  945.                 return f.namespace = a, f
  946.             }
  947.  
  948.             function f(a) {
  949.                 c.save(a);
  950.                 for (var b = (a || "").split(/[\s,]+/), d = b.length, e = 0; d > e; e++) b[e] && (a = b[e].replace(/\*/g, ".*?"), "-" === a[0] ? c.skips.push(new RegExp("^" + a.substr(1) + "$")) : c.names.push(new RegExp("^" + a + "$")))
  951.             }
  952.  
  953.             function g() {
  954.                 c.enable("")
  955.             }
  956.  
  957.             function h(a) {
  958.                 var b, d;
  959.                 for (b = 0, d = c.skips.length; d > b; b++)
  960.                     if (c.skips[b].test(a)) return !1;
  961.                 for (b = 0, d = c.names.length; d > b; b++)
  962.                     if (c.names[b].test(a)) return !0;
  963.                 return !1
  964.             }
  965.  
  966.             function i(a) {
  967.                 return a instanceof Error ? a.stack || a.message : a
  968.             }
  969.             c = b.exports = e, c.coerce = i, c.disable = g, c.enable = f, c.enabled = h, c.humanize = a("ms"), c.names = [], c.skips = [], c.formatters = {};
  970.             var j, k = 0
  971.         }, {
  972.             ms: 25
  973.         }],
  974.         19: [function(a, b, c) {
  975.             (function(b) {
  976.                 function d(a, b) {
  977.                     var d = "b" + c.packets[a.type] + a.data.data;
  978.                     return b(d)
  979.                 }
  980.  
  981.                 function e(a, b, d) {
  982.                     if (!b) return c.encodeBase64Packet(a, d);
  983.                     var e = a.data,
  984.                         f = new Uint8Array(e),
  985.                         g = new Uint8Array(1 + e.byteLength);
  986.                     g[0] = r[a.type];
  987.                     for (var h = 0; h < f.length; h++) g[h + 1] = f[h];
  988.                     return d(g.buffer)
  989.                 }
  990.  
  991.                 function f(a, b, d) {
  992.                     if (!b) return c.encodeBase64Packet(a, d);
  993.                     var e = new FileReader;
  994.                     return e.onload = function() {
  995.                         a.data = e.result, c.encodePacket(a, b, !0, d)
  996.                     }, e.readAsArrayBuffer(a.data)
  997.                 }
  998.  
  999.                 function g(a, b, d) {
  1000.                     if (!b) return c.encodeBase64Packet(a, d);
  1001.                     if (q) return f(a, b, d);
  1002.                     var e = new Uint8Array(1);
  1003.                     e[0] = r[a.type];
  1004.                     var g = new u([e.buffer, a.data]);
  1005.                     return d(g)
  1006.                 }
  1007.  
  1008.                 function h(a, b, c) {
  1009.                     for (var d = new Array(a.length), e = m(a.length, c), f = function(a, c, e) {
  1010.                             b(c, function(b, c) {
  1011.                                 d[a] = c, e(b, d)
  1012.                             })
  1013.                         }, g = 0; g < a.length; g++) f(g, a[g], e)
  1014.                 }
  1015.                 var i = a("./keys"),
  1016.                     j = a("has-binary"),
  1017.                     k = a("arraybuffer.slice"),
  1018.                     l = a("base64-arraybuffer"),
  1019.                     m = a("after"),
  1020.                     n = a("utf8"),
  1021.                     o = navigator.userAgent.match(/Android/i),
  1022.                     p = /PhantomJS/i.test(navigator.userAgent),
  1023.                     q = o || p;
  1024.                 c.protocol = 3;
  1025.                 var r = c.packets = {
  1026.                         open: 0,
  1027.                         close: 1,
  1028.                         ping: 2,
  1029.                         pong: 3,
  1030.                         message: 4,
  1031.                         upgrade: 5,
  1032.                         noop: 6
  1033.                     },
  1034.                     s = i(r),
  1035.                     t = {
  1036.                         type: "error",
  1037.                         data: "parser error"
  1038.                     },
  1039.                     u = a("blob");
  1040.                 c.encodePacket = function(a, c, f, h) {
  1041.                     "function" == typeof c && (h = c, c = !1), "function" == typeof f && (h = f, f = null);
  1042.                     var i = void 0 === a.data ? void 0 : a.data.buffer || a.data;
  1043.                     if (b.ArrayBuffer && i instanceof ArrayBuffer) return e(a, c, h);
  1044.                     if (u && i instanceof b.Blob) return g(a, c, h);
  1045.                     if (i && i.base64) return d(a, h);
  1046.                     var j = r[a.type];
  1047.                     return void 0 !== a.data && (j += f ? n.encode(String(a.data)) : String(a.data)), h("" + j)
  1048.                 }, c.encodeBase64Packet = function(a, d) {
  1049.                     var e = "b" + c.packets[a.type];
  1050.                     if (u && a.data instanceof b.Blob) {
  1051.                         var f = new FileReader;
  1052.                         return f.onload = function() {
  1053.                             var a = f.result.split(",")[1];
  1054.                             d(e + a)
  1055.                         }, f.readAsDataURL(a.data)
  1056.                     }
  1057.                     var g;
  1058.                     try {
  1059.                         g = String.fromCharCode.apply(null, new Uint8Array(a.data))
  1060.                     } catch (h) {
  1061.                         for (var i = new Uint8Array(a.data), j = new Array(i.length), k = 0; k < i.length; k++) j[k] = i[k];
  1062.                         g = String.fromCharCode.apply(null, j)
  1063.                     }
  1064.                     return e += b.btoa(g), d(e)
  1065.                 }, c.decodePacket = function(a, b, d) {
  1066.                     if ("string" == typeof a || void 0 === a) {
  1067.                         if ("b" == a.charAt(0)) return c.decodeBase64Packet(a.substr(1), b);
  1068.                         if (d) try {
  1069.                             a = n.decode(a)
  1070.                         } catch (e) {
  1071.                             return t
  1072.                         }
  1073.                         var f = a.charAt(0);
  1074.                         return Number(f) == f && s[f] ? a.length > 1 ? {
  1075.                             type: s[f],
  1076.                             data: a.substring(1)
  1077.                         } : {
  1078.                             type: s[f]
  1079.                         } : t
  1080.                     }
  1081.                     var g = new Uint8Array(a),
  1082.                         f = g[0],
  1083.                         h = k(a, 1);
  1084.                     return u && "blob" === b && (h = new u([h])), {
  1085.                         type: s[f],
  1086.                         data: h
  1087.                     }
  1088.                 }, c.decodeBase64Packet = function(a, c) {
  1089.                     var d = s[a.charAt(0)];
  1090.                     if (!b.ArrayBuffer) return {
  1091.                         type: d,
  1092.                         data: {
  1093.                             base64: !0,
  1094.                             data: a.substr(1)
  1095.                         }
  1096.                     };
  1097.                     var e = l.decode(a.substr(1));
  1098.                     return "blob" === c && u && (e = new u([e])), {
  1099.                         type: d,
  1100.                         data: e
  1101.                     }
  1102.                 }, c.encodePayload = function(a, b, d) {
  1103.                     function e(a) {
  1104.                         return a.length + ":" + a
  1105.                     }
  1106.  
  1107.                     function f(a, d) {
  1108.                         c.encodePacket(a, g ? b : !1, !0, function(a) {
  1109.                             d(null, e(a))
  1110.                         })
  1111.                     }
  1112.                     "function" == typeof b && (d = b, b = null);
  1113.                     var g = j(a);
  1114.                     return b && g ? u && !q ? c.encodePayloadAsBlob(a, d) : c.encodePayloadAsArrayBuffer(a, d) : a.length ? void h(a, f, function(a, b) {
  1115.                         return d(b.join(""))
  1116.                     }) : d("0:")
  1117.                 }, c.decodePayload = function(a, b, d) {
  1118.                     if ("string" != typeof a) return c.decodePayloadAsBinary(a, b, d);
  1119.                     "function" == typeof b && (d = b, b = null);
  1120.                     var e;
  1121.                     if ("" == a) return d(t, 0, 1);
  1122.                     for (var f, g, h = "", i = 0, j = a.length; j > i; i++) {
  1123.                         var k = a.charAt(i);
  1124.                         if (":" != k) h += k;
  1125.                         else {
  1126.                             if ("" == h || h != (f = Number(h))) return d(t, 0, 1);
  1127.                             if (g = a.substr(i + 1, f), h != g.length) return d(t, 0, 1);
  1128.                             if (g.length) {
  1129.                                 if (e = c.decodePacket(g, b, !0), t.type == e.type && t.data == e.data) return d(t, 0, 1);
  1130.                                 var l = d(e, i + f, j);
  1131.                                 if (!1 === l) return
  1132.                             }
  1133.                             i += f, h = ""
  1134.                         }
  1135.                     }
  1136.                     return "" != h ? d(t, 0, 1) : void 0
  1137.                 }, c.encodePayloadAsArrayBuffer = function(a, b) {
  1138.                     function d(a, b) {
  1139.                         c.encodePacket(a, !0, !0, function(a) {
  1140.                             return b(null, a)
  1141.                         })
  1142.                     }
  1143.                     return a.length ? void h(a, d, function(a, c) {
  1144.                         var d = c.reduce(function(a, b) {
  1145.                                 var c;
  1146.                                 return c = "string" == typeof b ? b.length : b.byteLength, a + c.toString().length + c + 2
  1147.                             }, 0),
  1148.                             e = new Uint8Array(d),
  1149.                             f = 0;
  1150.                         return c.forEach(function(a) {
  1151.                             var b = "string" == typeof a,
  1152.                                 c = a;
  1153.                             if (b) {
  1154.                                 for (var d = new Uint8Array(a.length), g = 0; g < a.length; g++) d[g] = a.charCodeAt(g);
  1155.                                 c = d.buffer
  1156.                             }
  1157.                             b ? e[f++] = 0 : e[f++] = 1;
  1158.                             for (var h = c.byteLength.toString(), g = 0; g < h.length; g++) e[f++] = parseInt(h[g]);
  1159.                             e[f++] = 255;
  1160.                             for (var d = new Uint8Array(c), g = 0; g < d.length; g++) e[f++] = d[g]
  1161.                         }), b(e.buffer)
  1162.                     }) : b(new ArrayBuffer(0))
  1163.                 }, c.encodePayloadAsBlob = function(a, b) {
  1164.                     function d(a, b) {
  1165.                         c.encodePacket(a, !0, !0, function(a) {
  1166.                             var c = new Uint8Array(1);
  1167.                             if (c[0] = 1, "string" == typeof a) {
  1168.                                 for (var d = new Uint8Array(a.length), e = 0; e < a.length; e++) d[e] = a.charCodeAt(e);
  1169.                                 a = d.buffer, c[0] = 0
  1170.                             }
  1171.                             for (var f = a instanceof ArrayBuffer ? a.byteLength : a.size, g = f.toString(), h = new Uint8Array(g.length + 1), e = 0; e < g.length; e++) h[e] = parseInt(g[e]);
  1172.                             if (h[g.length] = 255, u) {
  1173.                                 var i = new u([c.buffer, h.buffer, a]);
  1174.                                 b(null, i)
  1175.                             }
  1176.                         })
  1177.                     }
  1178.                     h(a, d, function(a, c) {
  1179.                         return b(new u(c))
  1180.                     })
  1181.                 }, c.decodePayloadAsBinary = function(a, b, d) {
  1182.                     "function" == typeof b && (d = b, b = null);
  1183.                     for (var e = a, f = [], g = !1; e.byteLength > 0;) {
  1184.                         for (var h = new Uint8Array(e), i = 0 === h[0], j = "", l = 1; 255 != h[l]; l++) {
  1185.                             if (j.length > 310) {
  1186.                                 g = !0;
  1187.                                 break
  1188.                             }
  1189.                             j += h[l]
  1190.                         }
  1191.                         if (g) return d(t, 0, 1);
  1192.                         e = k(e, 2 + j.length), j = parseInt(j);
  1193.                         var m = k(e, 0, j);
  1194.                         if (i) try {
  1195.                             m = String.fromCharCode.apply(null, new Uint8Array(m))
  1196.                         } catch (n) {
  1197.                             var o = new Uint8Array(m);
  1198.                             m = "";
  1199.                             for (var l = 0; l < o.length; l++) m += String.fromCharCode(o[l])
  1200.                         }
  1201.                         f.push(m), e = k(e, j)
  1202.                     }
  1203.                     var p = f.length;
  1204.                     f.forEach(function(a, e) {
  1205.                         d(c.decodePacket(a, b, !0), e, p)
  1206.                     })
  1207.                 }
  1208.             }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {})
  1209.         }, {
  1210.             "./keys": 20,
  1211.             after: 11,
  1212.             "arraybuffer.slice": 12,
  1213.             "base64-arraybuffer": 13,
  1214.             blob: 14,
  1215.             "has-binary": 21,
  1216.             utf8: 29
  1217.         }],
  1218.         20: [function(a, b, c) {
  1219.             b.exports = Object.keys || function(a) {
  1220.                 var b = [],
  1221.                     c = Object.prototype.hasOwnProperty;
  1222.                 for (var d in a) c.call(a, d) && b.push(d);
  1223.                 return b
  1224.             }
  1225.         }, {}],
  1226.         21: [function(a, b, c) {
  1227.             (function(c) {
  1228.                 function d(a) {
  1229.                     function b(a) {
  1230.                         if (!a) return !1;
  1231.                         if (c.Buffer && c.Buffer.isBuffer(a) || c.ArrayBuffer && a instanceof ArrayBuffer || c.Blob && a instanceof Blob || c.File && a instanceof File) return !0;
  1232.                         if (e(a)) {
  1233.                             for (var d = 0; d < a.length; d++)
  1234.                                 if (b(a[d])) return !0
  1235.                         } else if (a && "object" == typeof a) {
  1236.                             a.toJSON && (a = a.toJSON());
  1237.                             for (var f in a)
  1238.                                 if (Object.prototype.hasOwnProperty.call(a, f) && b(a[f])) return !0
  1239.                         }
  1240.                         return !1
  1241.                     }
  1242.                     return b(a)
  1243.                 }
  1244.                 var e = a("isarray");
  1245.                 b.exports = d
  1246.             }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {})
  1247.         }, {
  1248.             isarray: 24
  1249.         }],
  1250.         22: [function(a, b, c) {
  1251.             try {
  1252.                 b.exports = "undefined" != typeof XMLHttpRequest && "withCredentials" in new XMLHttpRequest
  1253.             } catch (d) {
  1254.                 b.exports = !1
  1255.             }
  1256.         }, {}],
  1257.         23: [function(a, b, c) {
  1258.             var d = [].indexOf;
  1259.             b.exports = function(a, b) {
  1260.                 if (d) return a.indexOf(b);
  1261.                 for (var c = 0; c < a.length; ++c)
  1262.                     if (a[c] === b) return c;
  1263.                 return -1
  1264.             }
  1265.         }, {}],
  1266.         24: [function(a, b, c) {
  1267.             b.exports = Array.isArray || function(a) {
  1268.                 return "[object Array]" == Object.prototype.toString.call(a)
  1269.             }
  1270.         }, {}],
  1271.         25: [function(a, b, c) {
  1272.             function d(a) {
  1273.                 if (a = "" + a, !(a.length > 1e4)) {
  1274.                     var b = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(a);
  1275.                     if (b) {
  1276.                         var c = parseFloat(b[1]),
  1277.                             d = (b[2] || "ms").toLowerCase();
  1278.                         switch (d) {
  1279.                             case "years":
  1280.                             case "year":
  1281.                             case "yrs":
  1282.                             case "yr":
  1283.                             case "y":
  1284.                                 return c * l;
  1285.                             case "days":
  1286.                             case "day":
  1287.                             case "d":
  1288.                                 return c * k;
  1289.                             case "hours":
  1290.                             case "hour":
  1291.                             case "hrs":
  1292.                             case "hr":
  1293.                             case "h":
  1294.                                 return c * j;
  1295.                             case "minutes":
  1296.                             case "minute":
  1297.                             case "mins":
  1298.                             case "min":
  1299.                             case "m":
  1300.                                 return c * i;
  1301.                             case "seconds":
  1302.                             case "second":
  1303.                             case "secs":
  1304.                             case "sec":
  1305.                             case "s":
  1306.                                 return c * h;
  1307.                             case "milliseconds":
  1308.                             case "millisecond":
  1309.                             case "msecs":
  1310.                             case "msec":
  1311.                             case "ms":
  1312.                                 return c
  1313.                         }
  1314.                     }
  1315.                 }
  1316.             }
  1317.  
  1318.             function e(a) {
  1319.                 return a >= k ? Math.round(a / k) + "d" : a >= j ? Math.round(a / j) + "h" : a >= i ? Math.round(a / i) + "m" : a >= h ? Math.round(a / h) + "s" : a + "ms"
  1320.             }
  1321.  
  1322.             function f(a) {
  1323.                 return g(a, k, "day") || g(a, j, "hour") || g(a, i, "minute") || g(a, h, "second") || a + " ms"
  1324.             }
  1325.  
  1326.             function g(a, b, c) {
  1327.                 return b > a ? void 0 : 1.5 * b > a ? Math.floor(a / b) + " " + c : Math.ceil(a / b) + " " + c + "s"
  1328.             }
  1329.             var h = 1e3,
  1330.                 i = 60 * h,
  1331.                 j = 60 * i,
  1332.                 k = 24 * j,
  1333.                 l = 365.25 * k;
  1334.             b.exports = function(a, b) {
  1335.                 return b = b || {}, "string" == typeof a ? d(a) : b["long"] ? f(a) : e(a)
  1336.             }
  1337.         }, {}],
  1338.         26: [function(a, b, c) {
  1339.             (function(a) {
  1340.                 var c = /^[\],:{}\s]*$/,
  1341.                     d = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
  1342.                     e = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
  1343.                     f = /(?:^|:|,)(?:\s*\[)+/g,
  1344.                     g = /^\s+/,
  1345.                     h = /\s+$/;
  1346.                 b.exports = function(b) {
  1347.                     return "string" == typeof b && b ? (b = b.replace(g, "").replace(h, ""), a.JSON && JSON.parse ? JSON.parse(b) : c.test(b.replace(d, "@").replace(e, "]").replace(f, "")) ? new Function("return " + b)() : void 0) : null
  1348.                 }
  1349.             }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {})
  1350.         }, {}],
  1351.         27: [function(a, b, c) {
  1352.             c.encode = function(a) {
  1353.                 var b = "";
  1354.                 for (var c in a) a.hasOwnProperty(c) && (b.length && (b += "&"), b += encodeURIComponent(c) + "=" + encodeURIComponent(a[c]));
  1355.                 return b
  1356.             }, c.decode = function(a) {
  1357.                 for (var b = {}, c = a.split("&"), d = 0, e = c.length; e > d; d++) {
  1358.                     var f = c[d].split("=");
  1359.                     b[decodeURIComponent(f[0])] = decodeURIComponent(f[1])
  1360.                 }
  1361.                 return b
  1362.             }
  1363.         }, {}],
  1364.         28: [function(a, b, c) {
  1365.             var d = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,
  1366.                 e = ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor"];
  1367.             b.exports = function(a) {
  1368.                 var b = a,
  1369.                     c = a.indexOf("["),
  1370.                     f = a.indexOf("]"); - 1 != c && -1 != f && (a = a.substring(0, c) + a.substring(c, f).replace(/:/g, ";") + a.substring(f, a.length));
  1371.                 for (var g = d.exec(a || ""), h = {}, i = 14; i--;) h[e[i]] = g[i] || "";
  1372.                 return -1 != c && -1 != f && (h.source = b, h.host = h.host.substring(1, h.host.length - 1).replace(/;/g, ":"), h.authority = h.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), h.ipv6uri = !0), h
  1373.             }
  1374.         }, {}],
  1375.         29: [function(b, c, d) {
  1376.             (function(b) {
  1377.                 ! function(e) {
  1378.                     function f(a) {
  1379.                         for (var b, c, d = [], e = 0, f = a.length; f > e;) b = a.charCodeAt(e++), b >= 55296 && 56319 >= b && f > e ? (c = a.charCodeAt(e++), 56320 == (64512 & c) ? d.push(((1023 & b) << 10) + (1023 & c) + 65536) : (d.push(b), e--)) : d.push(b);
  1380.                         return d
  1381.                     }
  1382.  
  1383.                     function g(a) {
  1384.                         for (var b, c = a.length, d = -1, e = ""; ++d < c;) b = a[d], b > 65535 && (b -= 65536, e += u(b >>> 10 & 1023 | 55296), b = 56320 | 1023 & b), e += u(b);
  1385.                         return e
  1386.                     }
  1387.  
  1388.                     function h(a) {
  1389.                         if (a >= 55296 && 57343 >= a) throw Error("Lone surrogate U+" + a.toString(16).toUpperCase() + " is not a scalar value")
  1390.                     }
  1391.  
  1392.                     function i(a, b) {
  1393.                         return u(a >> b & 63 | 128)
  1394.                     }
  1395.  
  1396.                     function j(a) {
  1397.                         if (0 == (4294967168 & a)) return u(a);
  1398.                         var b = "";
  1399.                         return 0 == (4294965248 & a) ? b = u(a >> 6 & 31 | 192) : 0 == (4294901760 & a) ? (h(a), b = u(a >> 12 & 15 | 224), b += i(a, 6)) : 0 == (4292870144 & a) && (b = u(a >> 18 & 7 | 240), b += i(a, 12), b += i(a, 6)), b += u(63 & a | 128)
  1400.                     }
  1401.  
  1402.                     function k(a) {
  1403.                         for (var b, c = f(a), d = c.length, e = -1, g = ""; ++e < d;) b = c[e], g += j(b);
  1404.                         return g
  1405.                     }
  1406.  
  1407.                     function l() {
  1408.                         if (t >= s) throw Error("Invalid byte index");
  1409.                         var a = 255 & r[t];
  1410.                         if (t++, 128 == (192 & a)) return 63 & a;
  1411.                         throw Error("Invalid continuation byte")
  1412.                     }
  1413.  
  1414.                     function m() {
  1415.                         var a, b, c, d, e;
  1416.                         if (t > s) throw Error("Invalid byte index");
  1417.                         if (t == s) return !1;
  1418.                         if (a = 255 & r[t], t++, 0 == (128 & a)) return a;
  1419.                         if (192 == (224 & a)) {
  1420.                             var b = l();
  1421.                             if (e = (31 & a) << 6 | b, e >= 128) return e;
  1422.                             throw Error("Invalid continuation byte")
  1423.                         }
  1424.                         if (224 == (240 & a)) {
  1425.                             if (b = l(), c = l(), e = (15 & a) << 12 | b << 6 | c, e >= 2048) return h(e), e;
  1426.                             throw Error("Invalid continuation byte")
  1427.                         }
  1428.                         if (240 == (248 & a) && (b = l(), c = l(), d = l(), e = (15 & a) << 18 | b << 12 | c << 6 | d, e >= 65536 && 1114111 >= e)) return e;
  1429.                         throw Error("Invalid UTF-8 detected")
  1430.                     }
  1431.  
  1432.                     function n(a) {
  1433.                         r = f(a), s = r.length, t = 0;
  1434.                         for (var b, c = [];
  1435.                             (b = m()) !== !1;) c.push(b);
  1436.                         return g(c)
  1437.                     }
  1438.                     var o = "object" == typeof d && d,
  1439.                         p = "object" == typeof c && c && c.exports == o && c,
  1440.                         q = "object" == typeof b && b;
  1441.                     (q.global === q || q.window === q) && (e = q);
  1442.                     var r, s, t, u = String.fromCharCode,
  1443.                         v = {
  1444.                             version: "2.0.0",
  1445.                             encode: k,
  1446.                             decode: n
  1447.                         };
  1448.                     if ("function" == typeof a && "object" == typeof a.amd && a.amd) a(function() {
  1449.                         return v
  1450.                     });
  1451.                     else if (o && !o.nodeType)
  1452.                         if (p) p.exports = v;
  1453.                         else {
  1454.                             var w = {},
  1455.                                 x = w.hasOwnProperty;
  1456.                             for (var y in v) x.call(v, y) && (o[y] = v[y])
  1457.                         } else e.utf8 = v
  1458.                 }(this)
  1459.             }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {})
  1460.         }, {}],
  1461.         30: [function(a, b, c) {
  1462.             "use strict";
  1463.  
  1464.             function d(a) {
  1465.                 var b = "";
  1466.                 do b = h[a % i] + b, a = Math.floor(a / i); while (a > 0);
  1467.                 return b
  1468.             }
  1469.  
  1470.             function e(a) {
  1471.                 var b = 0;
  1472.                 for (l = 0; l < a.length; l++) b = b * i + j[a.charAt(l)];
  1473.                 return b
  1474.             }
  1475.  
  1476.             function f() {
  1477.                 var a = d(+new Date);
  1478.                 return a !== g ? (k = 0, g = a) : a + "." + d(k++)
  1479.             }
  1480.             for (var g, h = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""), i = 64, j = {}, k = 0, l = 0; i > l; l++) j[h[l]] = l;
  1481.             f.encode = d, f.decode = e, b.exports = f
  1482.         }, {}],
  1483.         31: [function(a, b, c) {
  1484.             function d(a, b) {
  1485.                 "object" == typeof a && (b = a, a = void 0), b = b || {};
  1486.                 var c, d = e(a),
  1487.                     f = d.source,
  1488.                     j = d.id,
  1489.                     k = d.path,
  1490.                     l = i[j] && k in i[j].nsps,
  1491.                     m = b.forceNew || b["force new connection"] || !1 === b.multiplex || l;
  1492.                 return m ? (h("ignoring socket cache for %s", f), c = g(f, b)) : (i[j] || (h("new io instance for %s", f), i[j] = g(f, b)), c = i[j]), c.socket(d.path)
  1493.             }
  1494.             var e = a("./url"),
  1495.                 f = a("socket.io-parser"),
  1496.                 g = a("./manager"),
  1497.                 h = a("debug")("socket.io-client");
  1498.             b.exports = c = d;
  1499.             var i = c.managers = {};
  1500.             c.protocol = f.protocol, c.connect = d, c.Manager = a("./manager"), c.Socket = a("./socket")
  1501.         }, {
  1502.             "./manager": 32,
  1503.             "./socket": 34,
  1504.             "./url": 35,
  1505.             debug: 39,
  1506.             "socket.io-parser": 47
  1507.         }],
  1508.         32: [function(a, b, c) {
  1509.             function d(a, b) {
  1510.                 return this instanceof d ? (a && "object" == typeof a && (b = a, a = void 0), b = b || {}, b.path = b.path || "/socket.io", this.nsps = {}, this.subs = [], this.opts = b, this.reconnection(b.reconnection !== !1), this.reconnectionAttempts(b.reconnectionAttempts || 1 / 0), this.reconnectionDelay(b.reconnectionDelay || 1e3), this.reconnectionDelayMax(b.reconnectionDelayMax || 5e3), this.randomizationFactor(b.randomizationFactor || .5), this.backoff = new m({
  1511.                     min: this.reconnectionDelay(),
  1512.                     max: this.reconnectionDelayMax(),
  1513.                     jitter: this.randomizationFactor()
  1514.                 }), this.timeout(null == b.timeout ? 2e4 : b.timeout), this.readyState = "closed", this.uri = a, this.connecting = [], this.lastPing = null, this.encoding = !1, this.packetBuffer = [], this.encoder = new h.Encoder, this.decoder = new h.Decoder, this.autoConnect = b.autoConnect !== !1, void(this.autoConnect && this.open())) : new d(a, b)
  1515.             }
  1516.             var e = a("engine.io-client"),
  1517.                 f = a("./socket"),
  1518.                 g = a("component-emitter"),
  1519.                 h = a("socket.io-parser"),
  1520.                 i = a("./on"),
  1521.                 j = a("component-bind"),
  1522.                 k = a("debug")("socket.io-client:manager"),
  1523.                 l = a("indexof"),
  1524.                 m = a("backo2"),
  1525.                 n = Object.prototype.hasOwnProperty;
  1526.             b.exports = d, d.prototype.emitAll = function() {
  1527.                 this.emit.apply(this, arguments);
  1528.                 for (var a in this.nsps) n.call(this.nsps, a) && this.nsps[a].emit.apply(this.nsps[a], arguments)
  1529.             }, d.prototype.updateSocketIds = function() {
  1530.                 for (var a in this.nsps) n.call(this.nsps, a) && (this.nsps[a].id = this.engine.id)
  1531.             }, g(d.prototype), d.prototype.reconnection = function(a) {
  1532.                 return arguments.length ? (this._reconnection = !!a, this) : this._reconnection
  1533.             }, d.prototype.reconnectionAttempts = function(a) {
  1534.                 return arguments.length ? (this._reconnectionAttempts = a, this) : this._reconnectionAttempts
  1535.             }, d.prototype.reconnectionDelay = function(a) {
  1536.                 return arguments.length ? (this._reconnectionDelay = a, this.backoff && this.backoff.setMin(a), this) : this._reconnectionDelay
  1537.             }, d.prototype.randomizationFactor = function(a) {
  1538.                 return arguments.length ? (this._randomizationFactor = a, this.backoff && this.backoff.setJitter(a), this) : this._randomizationFactor
  1539.             }, d.prototype.reconnectionDelayMax = function(a) {
  1540.                 return arguments.length ? (this._reconnectionDelayMax = a, this.backoff && this.backoff.setMax(a), this) : this._reconnectionDelayMax
  1541.             }, d.prototype.timeout = function(a) {
  1542.                 return arguments.length ? (this._timeout = a, this) : this._timeout
  1543.             }, d.prototype.maybeReconnectOnOpen = function() {
  1544.                 !this.reconnecting && this._reconnection && 0 === this.backoff.attempts && this.reconnect()
  1545.             }, d.prototype.open = d.prototype.connect = function(a) {
  1546.                 if (k("readyState %s", this.readyState), ~this.readyState.indexOf("open")) return this;
  1547.                 k("opening %s", this.uri), this.engine = e(this.uri, this.opts);
  1548.                 var b = this.engine,
  1549.                     c = this;
  1550.                 this.readyState = "opening", this.skipReconnect = !1;
  1551.                 var d = i(b, "open", function() {
  1552.                         c.onopen(), a && a()
  1553.                     }),
  1554.                     f = i(b, "error", function(b) {
  1555.                         if (k("connect_error"), c.cleanup(), c.readyState = "closed", c.emitAll("connect_error", b), a) {
  1556.                             var d = new Error("Connection error");
  1557.                             d.data = b, a(d)
  1558.                         } else c.maybeReconnectOnOpen()
  1559.                     });
  1560.                 if (!1 !== this._timeout) {
  1561.                     var g = this._timeout;
  1562.                     k("connect attempt will timeout after %d", g);
  1563.                     var h = setTimeout(function() {
  1564.                         k("connect attempt timed out after %d", g), d.destroy(), b.close(), b.emit("error", "timeout"), c.emitAll("connect_timeout", g)
  1565.                     }, g);
  1566.                     this.subs.push({
  1567.                         destroy: function() {
  1568.                             clearTimeout(h)
  1569.                         }
  1570.                     })
  1571.                 }
  1572.                 return this.subs.push(d), this.subs.push(f), this
  1573.             }, d.prototype.onopen = function() {
  1574.                 k("open"), this.cleanup(), this.readyState = "open", this.emit("open");
  1575.                 var a = this.engine;
  1576.                 this.subs.push(i(a, "data", j(this, "ondata"))), this.subs.push(i(a, "ping", j(this, "onping"))), this.subs.push(i(a, "pong", j(this, "onpong"))), this.subs.push(i(a, "error", j(this, "onerror"))), this.subs.push(i(a, "close", j(this, "onclose"))), this.subs.push(i(this.decoder, "decoded", j(this, "ondecoded")))
  1577.             }, d.prototype.onping = function() {
  1578.                 this.lastPing = new Date, this.emitAll("ping")
  1579.             }, d.prototype.onpong = function() {
  1580.                 this.emitAll("pong", new Date - this.lastPing)
  1581.             }, d.prototype.ondata = function(a) {
  1582.                 this.decoder.add(a)
  1583.             }, d.prototype.ondecoded = function(a) {
  1584.                 this.emit("packet", a)
  1585.             }, d.prototype.onerror = function(a) {
  1586.                 k("error", a), this.emitAll("error", a)
  1587.             }, d.prototype.socket = function(a) {
  1588.                 function b() {
  1589.                     ~l(d.connecting, c) || d.connecting.push(c)
  1590.                 }
  1591.                 var c = this.nsps[a];
  1592.                 if (!c) {
  1593.                     c = new f(this, a), this.nsps[a] = c;
  1594.                     var d = this;
  1595.                     c.on("connecting", b), c.on("connect", function() {
  1596.                         c.id = d.engine.id
  1597.                     }), this.autoConnect && b()
  1598.                 }
  1599.                 return c
  1600.             }, d.prototype.destroy = function(a) {
  1601.                 var b = l(this.connecting, a);
  1602.                 ~b && this.connecting.splice(b, 1), this.connecting.length || this.close()
  1603.             }, d.prototype.packet = function(a) {
  1604.                 k("writing packet %j", a);
  1605.                 var b = this;
  1606.                 b.encoding ? b.packetBuffer.push(a) : (b.encoding = !0, this.encoder.encode(a, function(c) {
  1607.                     for (var d = 0; d < c.length; d++) b.engine.write(c[d], a.options);
  1608.                     b.encoding = !1, b.processPacketQueue()
  1609.                 }))
  1610.             }, d.prototype.processPacketQueue = function() {
  1611.                 if (this.packetBuffer.length > 0 && !this.encoding) {
  1612.                     var a = this.packetBuffer.shift();
  1613.                     this.packet(a)
  1614.                 }
  1615.             }, d.prototype.cleanup = function() {
  1616.                 k("cleanup");
  1617.                 for (var a; a = this.subs.shift();) a.destroy();
  1618.                 this.packetBuffer = [], this.encoding = !1, this.lastPing = null, this.decoder.destroy()
  1619.             }, d.prototype.close = d.prototype.disconnect = function() {
  1620.                 k("disconnect"), this.skipReconnect = !0, this.reconnecting = !1, "opening" == this.readyState && this.cleanup(), this.backoff.reset(), this.readyState = "closed", this.engine && this.engine.close()
  1621.             }, d.prototype.onclose = function(a) {
  1622.                 k("onclose"), this.cleanup(), this.backoff.reset(), this.readyState = "closed", this.emit("close", a), this._reconnection && !this.skipReconnect && this.reconnect()
  1623.             }, d.prototype.reconnect = function() {
  1624.                 if (this.reconnecting || this.skipReconnect) return this;
  1625.                 var a = this;
  1626.                 if (this.backoff.attempts >= this._reconnectionAttempts) k("reconnect failed"), this.backoff.reset(), this.emitAll("reconnect_failed"), this.reconnecting = !1;
  1627.                 else {
  1628.                     var b = this.backoff.duration();
  1629.                     k("will wait %dms before reconnect attempt", b), this.reconnecting = !0;
  1630.                     var c = setTimeout(function() {
  1631.                         a.skipReconnect || (k("attempting reconnect"), a.emitAll("reconnect_attempt", a.backoff.attempts), a.emitAll("reconnecting", a.backoff.attempts), a.skipReconnect || a.open(function(b) {
  1632.                             b ? (k("reconnect attempt error"), a.reconnecting = !1, a.reconnect(), a.emitAll("reconnect_error", b.data)) : (k("reconnect success"), a.onreconnect())
  1633.                         }))
  1634.                     }, b);
  1635.                     this.subs.push({
  1636.                         destroy: function() {
  1637.                             clearTimeout(c)
  1638.                         }
  1639.                     })
  1640.                 }
  1641.             }, d.prototype.onreconnect = function() {
  1642.                 var a = this.backoff.attempts;
  1643.                 this.reconnecting = !1, this.backoff.reset(), this.updateSocketIds(), this.emitAll("reconnect", a)
  1644.             }
  1645.         }, {
  1646.             "./on": 33,
  1647.             "./socket": 34,
  1648.             backo2: 36,
  1649.             "component-bind": 37,
  1650.             "component-emitter": 38,
  1651.             debug: 39,
  1652.             "engine.io-client": 1,
  1653.             indexof: 42,
  1654.             "socket.io-parser": 47
  1655.         }],
  1656.         33: [function(a, b, c) {
  1657.             function d(a, b, c) {
  1658.                 return a.on(b, c), {
  1659.                     destroy: function() {
  1660.                         a.removeListener(b, c)
  1661.                     }
  1662.                 }
  1663.             }
  1664.             b.exports = d
  1665.         }, {}],
  1666.         34: [function(a, b, c) {
  1667.             function d(a, b) {
  1668.                 this.io = a, this.nsp = b, this.json = this, this.ids = 0, this.acks = {}, this.receiveBuffer = [], this.sendBuffer = [], this.connected = !1, this.disconnected = !0, this.io.autoConnect && this.open()
  1669.             }
  1670.             var e = a("socket.io-parser"),
  1671.                 f = a("component-emitter"),
  1672.                 g = a("to-array"),
  1673.                 h = a("./on"),
  1674.                 i = a("component-bind"),
  1675.                 j = a("debug")("socket.io-client:socket"),
  1676.                 k = a("has-binary");
  1677.             b.exports = c = d;
  1678.             var l = {
  1679.                     connect: 1,
  1680.                     connect_error: 1,
  1681.                     connect_timeout: 1,
  1682.                     connecting: 1,
  1683.                     disconnect: 1,
  1684.                     error: 1,
  1685.                     reconnect: 1,
  1686.                     reconnect_attempt: 1,
  1687.                     reconnect_failed: 1,
  1688.                     reconnect_error: 1,
  1689.                     reconnecting: 1,
  1690.                     ping: 1,
  1691.                     pong: 1
  1692.                 },
  1693.                 m = f.prototype.emit;
  1694.             f(d.prototype), d.prototype.subEvents = function() {
  1695.                 if (!this.subs) {
  1696.                     var a = this.io;
  1697.                     this.subs = [h(a, "open", i(this, "onopen")), h(a, "packet", i(this, "onpacket")), h(a, "close", i(this, "onclose"))]
  1698.                 }
  1699.             }, d.prototype.open = d.prototype.connect = function() {
  1700.                 return this.connected ? this : (this.subEvents(), this.io.open(), "open" == this.io.readyState && this.onopen(), this.emit("connecting"), this)
  1701.             }, d.prototype.send = function() {
  1702.                 var a = g(arguments);
  1703.                 return a.unshift("message"), this.emit.apply(this, a), this
  1704.             }, d.prototype.emit = function(a) {
  1705.                 if (l.hasOwnProperty(a)) return m.apply(this, arguments), this;
  1706.                 var b = g(arguments),
  1707.                     c = e.EVENT;
  1708.                 k(b) && (c = e.BINARY_EVENT);
  1709.                 var d = {
  1710.                     type: c,
  1711.                     data: b
  1712.                 };
  1713.                 return d.options = {}, d.options.compress = !this.flags || !1 !== this.flags.compress, "function" == typeof b[b.length - 1] && (j("emitting packet with ack id %d", this.ids), this.acks[this.ids] = b.pop(), d.id = this.ids++), this.connected ? this.packet(d) : this.sendBuffer.push(d), delete this.flags, this
  1714.             }, d.prototype.packet = function(a) {
  1715.                 a.nsp = this.nsp, this.io.packet(a)
  1716.             }, d.prototype.onopen = function() {
  1717.                 j("transport is open - connecting"), "/" != this.nsp && this.packet({
  1718.                     type: e.CONNECT
  1719.                 })
  1720.             }, d.prototype.onclose = function(a) {
  1721.                 j("close (%s)", a), this.connected = !1, this.disconnected = !0, delete this.id, this.emit("disconnect", a)
  1722.             }, d.prototype.onpacket = function(a) {
  1723.                 if (a.nsp == this.nsp) switch (a.type) {
  1724.                     case e.CONNECT:
  1725.                         this.onconnect();
  1726.                         break;
  1727.                     case e.EVENT:
  1728.                         this.onevent(a);
  1729.                         break;
  1730.                     case e.BINARY_EVENT:
  1731.                         this.onevent(a);
  1732.                         break;
  1733.                     case e.ACK:
  1734.                         this.onack(a);
  1735.                         break;
  1736.                     case e.BINARY_ACK:
  1737.                         this.onack(a);
  1738.                         break;
  1739.                     case e.DISCONNECT:
  1740.                         this.ondisconnect();
  1741.                         break;
  1742.                     case e.ERROR:
  1743.                         this.emit("error", a.data)
  1744.                 }
  1745.             }, d.prototype.onevent = function(a) {
  1746.                 var b = a.data || [];
  1747.                 j("emitting event %j", b), null != a.id && (j("attaching ack callback to event"), b.push(this.ack(a.id))), this.connected ? m.apply(this, b) : this.receiveBuffer.push(b)
  1748.             }, d.prototype.ack = function(a) {
  1749.                 var b = this,
  1750.                     c = !1;
  1751.                 return function() {
  1752.                     if (!c) {
  1753.                         c = !0;
  1754.                         var d = g(arguments);
  1755.                         j("sending ack %j", d);
  1756.                         var f = k(d) ? e.BINARY_ACK : e.ACK;
  1757.                         b.packet({
  1758.                             type: f,
  1759.                             id: a,
  1760.                             data: d
  1761.                         })
  1762.                     }
  1763.                 }
  1764.             }, d.prototype.onack = function(a) {
  1765.                 var b = this.acks[a.id];
  1766.                 "function" == typeof b ? (j("calling ack %s with %j", a.id, a.data), b.apply(this, a.data), delete this.acks[a.id]) : j("bad ack %s", a.id)
  1767.             }, d.prototype.onconnect = function() {
  1768.                 this.connected = !0, this.disconnected = !1, this.emit("connect"), this.emitBuffered()
  1769.             }, d.prototype.emitBuffered = function() {
  1770.                 var a;
  1771.                 for (a = 0; a < this.receiveBuffer.length; a++) m.apply(this, this.receiveBuffer[a]);
  1772.                 for (this.receiveBuffer = [], a = 0; a < this.sendBuffer.length; a++) this.packet(this.sendBuffer[a]);
  1773.                 this.sendBuffer = []
  1774.             }, d.prototype.ondisconnect = function() {
  1775.                 j("server disconnect (%s)", this.nsp), this.destroy(), this.onclose("io server disconnect")
  1776.             }, d.prototype.destroy = function() {
  1777.                 if (this.subs) {
  1778.                     for (var a = 0; a < this.subs.length; a++) this.subs[a].destroy();
  1779.                     this.subs = null
  1780.                 }
  1781.                 this.io.destroy(this)
  1782.             }, d.prototype.close = d.prototype.disconnect = function() {
  1783.                 return this.connected && (j("performing disconnect (%s)", this.nsp), this.packet({
  1784.                     type: e.DISCONNECT
  1785.                 })), this.destroy(), this.connected && this.onclose("io client disconnect"), this
  1786.             }, d.prototype.compress = function(a) {
  1787.                 return this.flags = this.flags || {}, this.flags.compress = a, this
  1788.             }
  1789.         }, {
  1790.             "./on": 33,
  1791.             "component-bind": 37,
  1792.             "component-emitter": 38,
  1793.             debug: 39,
  1794.             "has-binary": 41,
  1795.             "socket.io-parser": 47,
  1796.             "to-array": 51
  1797.         }],
  1798.         35: [function(a, b, c) {
  1799.             (function(c) {
  1800.                 function d(a, b) {
  1801.                     var d = a,
  1802.                         b = b || c.location;
  1803.                     null == a && (a = b.protocol + "//" + b.host), "string" == typeof a && ("/" == a.charAt(0) && (a = "/" == a.charAt(1) ? b.protocol + a : b.host + a), /^(https?|wss?):\/\//.test(a) || (f("protocol-less url %s", a), a = "undefined" != typeof b ? b.protocol + "//" + a : "https://" + a), f("parse %s", a), d = e(a)), d.port || (/^(http|ws)$/.test(d.protocol) ? d.port = "80" : /^(http|ws)s$/.test(d.protocol) && (d.port = "443")), d.path = d.path || "/";
  1804.                     var g = -1 !== d.host.indexOf(":"),
  1805.                         h = g ? "[" + d.host + "]" : d.host;
  1806.                     return d.id = d.protocol + "://" + h + ":" + d.port, d.href = d.protocol + "://" + h + (b && b.port == d.port ? "" : ":" + d.port), d
  1807.                 }
  1808.                 var e = a("parseuri"),
  1809.                     f = a("debug")("socket.io-client:url");
  1810.                 b.exports = d
  1811.             }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {})
  1812.         }, {
  1813.             debug: 39,
  1814.             parseuri: 45
  1815.         }],
  1816.         36: [function(a, b, c) {
  1817.             function d(a) {
  1818.                 a = a || {}, this.ms = a.min || 100, this.max = a.max || 1e4, this.factor = a.factor || 2, this.jitter = a.jitter > 0 && a.jitter <= 1 ? a.jitter : 0, this.attempts = 0
  1819.             }
  1820.             b.exports = d, d.prototype.duration = function() {
  1821.                 var a = this.ms * Math.pow(this.factor, this.attempts++);
  1822.                 if (this.jitter) {
  1823.                     var b = Math.random(),
  1824.                         c = Math.floor(b * this.jitter * a);
  1825.                     a = 0 == (1 & Math.floor(10 * b)) ? a - c : a + c
  1826.                 }
  1827.                 return 0 | Math.min(a, this.max)
  1828.             }, d.prototype.reset = function() {
  1829.                 this.attempts = 0
  1830.             }, d.prototype.setMin = function(a) {
  1831.                 this.ms = a
  1832.             }, d.prototype.setMax = function(a) {
  1833.                 this.max = a
  1834.             }, d.prototype.setJitter = function(a) {
  1835.                 this.jitter = a
  1836.             }
  1837.         }, {}],
  1838.         37: [function(a, b, c) {
  1839.             var d = [].slice;
  1840.             b.exports = function(a, b) {
  1841.                 if ("string" == typeof b && (b = a[b]), "function" != typeof b) throw new Error("bind() requires a function");
  1842.                 var c = d.call(arguments, 2);
  1843.                 return function() {
  1844.                     return b.apply(a, c.concat(d.call(arguments)))
  1845.                 }
  1846.             }
  1847.         }, {}],
  1848.         38: [function(a, b, c) {
  1849.             function d(a) {
  1850.                 return a ? e(a) : void 0
  1851.             }
  1852.  
  1853.             function e(a) {
  1854.                 for (var b in d.prototype) a[b] = d.prototype[b];
  1855.                 return a
  1856.             }
  1857.             b.exports = d, d.prototype.on = d.prototype.addEventListener = function(a, b) {
  1858.                 return this._callbacks = this._callbacks || {}, (this._callbacks["$" + a] = this._callbacks["$" + a] || []).push(b), this
  1859.             }, d.prototype.once = function(a, b) {
  1860.                 function c() {
  1861.                     this.off(a, c), b.apply(this, arguments)
  1862.                 }
  1863.                 return c.fn = b, this.on(a, c), this
  1864.             }, d.prototype.off = d.prototype.removeListener = d.prototype.removeAllListeners = d.prototype.removeEventListener = function(a, b) {
  1865.                 if (this._callbacks = this._callbacks || {}, 0 == arguments.length) return this._callbacks = {}, this;
  1866.                 var c = this._callbacks["$" + a];
  1867.                 if (!c) return this;
  1868.                 if (1 == arguments.length) return delete this._callbacks["$" + a], this;
  1869.                 for (var d, e = 0; e < c.length; e++)
  1870.                     if (d = c[e], d === b || d.fn === b) {
  1871.                         c.splice(e, 1);
  1872.                         break
  1873.                     }
  1874.                 return this
  1875.             }, d.prototype.emit = function(a) {
  1876.                 this._callbacks = this._callbacks || {};
  1877.                 var b = [].slice.call(arguments, 1),
  1878.                     c = this._callbacks["$" + a];
  1879.                 if (c) {
  1880.                     c = c.slice(0);
  1881.                     for (var d = 0, e = c.length; e > d; ++d) c[d].apply(this, b)
  1882.                 }
  1883.                 return this
  1884.             }, d.prototype.listeners = function(a) {
  1885.                 return this._callbacks = this._callbacks || {}, this._callbacks["$" + a] || []
  1886.             }, d.prototype.hasListeners = function(a) {
  1887.                 return !!this.listeners(a).length
  1888.             }
  1889.         }, {}],
  1890.         39: [function(a, b, c) {
  1891.             arguments[4][17][0].apply(c, arguments)
  1892.         }, {
  1893.             "./debug": 40,
  1894.             dup: 17
  1895.         }],
  1896.         40: [function(a, b, c) {
  1897.             arguments[4][18][0].apply(c, arguments)
  1898.         }, {
  1899.             dup: 18,
  1900.             ms: 44
  1901.         }],
  1902.         41: [function(a, b, c) {
  1903.             (function(c) {
  1904.                 function d(a) {
  1905.                     function b(a) {
  1906.                         if (!a) return !1;
  1907.                         if (c.Buffer && c.Buffer.isBuffer && c.Buffer.isBuffer(a) || c.ArrayBuffer && a instanceof ArrayBuffer || c.Blob && a instanceof Blob || c.File && a instanceof File) return !0;
  1908.                         if (e(a)) {
  1909.                             for (var d = 0; d < a.length; d++)
  1910.                                 if (b(a[d])) return !0
  1911.                         } else if (a && "object" == typeof a) {
  1912.                             a.toJSON && "function" == typeof a.toJSON && (a = a.toJSON());
  1913.                             for (var f in a)
  1914.                                 if (Object.prototype.hasOwnProperty.call(a, f) && b(a[f])) return !0
  1915.                         }
  1916.                         return !1
  1917.                     }
  1918.                     return b(a)
  1919.                 }
  1920.                 var e = a("isarray");
  1921.                 b.exports = d
  1922.             }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {})
  1923.         }, {
  1924.             isarray: 43
  1925.         }],
  1926.         42: [function(a, b, c) {
  1927.             arguments[4][23][0].apply(c, arguments)
  1928.         }, {
  1929.             dup: 23
  1930.         }],
  1931.         43: [function(a, b, c) {
  1932.             arguments[4][24][0].apply(c, arguments)
  1933.         }, {
  1934.             dup: 24
  1935.         }],
  1936.         44: [function(a, b, c) {
  1937.             arguments[4][25][0].apply(c, arguments)
  1938.         }, {
  1939.             dup: 25
  1940.         }],
  1941.         45: [function(a, b, c) {
  1942.             arguments[4][28][0].apply(c, arguments)
  1943.         }, {
  1944.             dup: 28
  1945.         }],
  1946.         46: [function(a, b, c) {
  1947.             (function(b) {
  1948.                 var d = a("isarray"),
  1949.                     e = a("./is-buffer");
  1950.                 c.deconstructPacket = function(a) {
  1951.                     function b(a) {
  1952.                         if (!a) return a;
  1953.                         if (e(a)) {
  1954.                             var f = {
  1955.                                 _placeholder: !0,
  1956.                                 num: c.length
  1957.                             };
  1958.                             return c.push(a), f
  1959.                         }
  1960.                         if (d(a)) {
  1961.                             for (var g = new Array(a.length), h = 0; h < a.length; h++) g[h] = b(a[h]);
  1962.                             return g
  1963.                         }
  1964.                         if ("object" == typeof a && !(a instanceof Date)) {
  1965.                             var g = {};
  1966.                             for (var i in a) g[i] = b(a[i]);
  1967.                             return g
  1968.                         }
  1969.                         return a
  1970.                     }
  1971.                     var c = [],
  1972.                         f = a.data,
  1973.                         g = a;
  1974.                     return g.data = b(f), g.attachments = c.length, {
  1975.                         packet: g,
  1976.                         buffers: c
  1977.                     }
  1978.                 }, c.reconstructPacket = function(a, b) {
  1979.                     function c(a) {
  1980.                         if (a && a._placeholder) {
  1981.                             var e = b[a.num];
  1982.                             return e
  1983.                         }
  1984.                         if (d(a)) {
  1985.                             for (var f = 0; f < a.length; f++) a[f] = c(a[f]);
  1986.                             return a
  1987.                         }
  1988.                         if (a && "object" == typeof a) {
  1989.                             for (var g in a) a[g] = c(a[g]);
  1990.                             return a
  1991.                         }
  1992.                         return a
  1993.                     }
  1994.                     return a.data = c(a.data), a.attachments = void 0, a
  1995.                 }, c.removeBlobs = function(a, c) {
  1996.                     function f(a, i, j) {
  1997.                         if (!a) return a;
  1998.                         if (b.Blob && a instanceof Blob || b.File && a instanceof File) {
  1999.                             g++;
  2000.                             var k = new FileReader;
  2001.                             k.onload = function() {
  2002.                                 j ? j[i] = this.result : h = this.result, --g || c(h)
  2003.                             }, k.readAsArrayBuffer(a)
  2004.                         } else if (d(a))
  2005.                             for (var l = 0; l < a.length; l++) f(a[l], l, a);
  2006.                         else if (a && "object" == typeof a && !e(a))
  2007.                             for (var m in a) f(a[m], m, a)
  2008.                     }
  2009.                     var g = 0,
  2010.                         h = a;
  2011.                     f(h), g || c(h)
  2012.                 }
  2013.             }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {})
  2014.         }, {
  2015.             "./is-buffer": 48,
  2016.             isarray: 43
  2017.         }],
  2018.         47: [function(a, b, c) {
  2019.             function d() {}
  2020.  
  2021.             function e(a) {
  2022.                 var b = "",
  2023.                     d = !1;
  2024.                 return b += a.type, (c.BINARY_EVENT == a.type || c.BINARY_ACK == a.type) && (b += a.attachments, b += "-"), a.nsp && "/" != a.nsp && (d = !0, b += a.nsp), null != a.id && (d && (b += ",", d = !1), b += a.id), null != a.data && (d && (b += ","), b += l.stringify(a.data)), k("encoded %j as %s", a, b), b
  2025.             }
  2026.  
  2027.             function f(a, b) {
  2028.                 function c(a) {
  2029.                     var c = n.deconstructPacket(a),
  2030.                         d = e(c.packet),
  2031.                         f = c.buffers;
  2032.                     f.unshift(d), b(f)
  2033.                 }
  2034.                 n.removeBlobs(a, c)
  2035.             }
  2036.  
  2037.             function g() {
  2038.                 this.reconstructor = null
  2039.             }
  2040.  
  2041.             function h(a) {
  2042.                 var b = {},
  2043.                     d = 0;
  2044.                 if (b.type = Number(a.charAt(0)), null == c.types[b.type]) return j();
  2045.                 if (c.BINARY_EVENT == b.type || c.BINARY_ACK == b.type) {
  2046.                     for (var e = "";
  2047.                         "-" != a.charAt(++d) && (e += a.charAt(d), d != a.length););
  2048.                     if (e != Number(e) || "-" != a.charAt(d)) throw new Error("Illegal attachments");
  2049.                     b.attachments = Number(e)
  2050.                 }
  2051.                 if ("/" == a.charAt(d + 1))
  2052.                     for (b.nsp = ""; ++d;) {
  2053.                         var f = a.charAt(d);
  2054.                         if ("," == f) break;
  2055.                         if (b.nsp += f, d == a.length) break
  2056.                     } else b.nsp = "/";
  2057.                 var g = a.charAt(d + 1);
  2058.                 if ("" !== g && Number(g) == g) {
  2059.                     for (b.id = ""; ++d;) {
  2060.                         var f = a.charAt(d);
  2061.                         if (null == f || Number(f) != f) {
  2062.                             --d;
  2063.                             break
  2064.                         }
  2065.                         if (b.id += a.charAt(d), d == a.length) break
  2066.                     }
  2067.                     b.id = Number(b.id)
  2068.                 }
  2069.                 if (a.charAt(++d)) try {
  2070.                     b.data = l.parse(a.substr(d))
  2071.                 } catch (h) {
  2072.                     return j()
  2073.                 }
  2074.                 return k("decoded %s as %j", a, b), b
  2075.             }
  2076.  
  2077.             function i(a) {
  2078.                 this.reconPack = a, this.buffers = []
  2079.             }
  2080.  
  2081.             function j(a) {
  2082.                 return {
  2083.                     type: c.ERROR,
  2084.                     data: "parser error"
  2085.                 }
  2086.             }
  2087.             var k = a("debug")("socket.io-parser"),
  2088.                 l = a("json3"),
  2089.                 m = (a("isarray"), a("component-emitter")),
  2090.                 n = a("./binary"),
  2091.                 o = a("./is-buffer");
  2092.             c.protocol = 4, c.types = ["CONNECT", "DISCONNECT", "EVENT", "BINARY_EVENT", "ACK", "BINARY_ACK", "ERROR"], c.CONNECT = 0, c.DISCONNECT = 1, c.EVENT = 2, c.ACK = 3, c.ERROR = 4, c.BINARY_EVENT = 5, c.BINARY_ACK = 6, c.Encoder = d, c.Decoder = g, d.prototype.encode = function(a, b) {
  2093.                 if (k("encoding packet %j", a), c.BINARY_EVENT == a.type || c.BINARY_ACK == a.type) f(a, b);
  2094.                 else {
  2095.                     var d = e(a);
  2096.                     b([d])
  2097.                 }
  2098.             }, m(g.prototype), g.prototype.add = function(a) {
  2099.                 var b;
  2100.                 if ("string" == typeof a) b = h(a), c.BINARY_EVENT == b.type || c.BINARY_ACK == b.type ? (this.reconstructor = new i(b), 0 === this.reconstructor.reconPack.attachments && this.emit("decoded", b)) : this.emit("decoded", b);
  2101.                 else {
  2102.                     if (!o(a) && !a.base64) throw new Error("Unknown type: " + a);
  2103.                     if (!this.reconstructor) throw new Error("got binary data when not reconstructing a packet");
  2104.                     b = this.reconstructor.takeBinaryData(a), b && (this.reconstructor = null, this.emit("decoded", b))
  2105.                 }
  2106.             }, g.prototype.destroy = function() {
  2107.                 this.reconstructor && this.reconstructor.finishedReconstruction()
  2108.             }, i.prototype.takeBinaryData = function(a) {
  2109.                 if (this.buffers.push(a), this.buffers.length == this.reconPack.attachments) {
  2110.                     var b = n.reconstructPacket(this.reconPack, this.buffers);
  2111.                     return this.finishedReconstruction(), b
  2112.                 }
  2113.                 return null
  2114.             }, i.prototype.finishedReconstruction = function() {
  2115.                 this.reconPack = null, this.buffers = []
  2116.             }
  2117.         }, {
  2118.             "./binary": 46,
  2119.             "./is-buffer": 48,
  2120.             "component-emitter": 49,
  2121.             debug: 39,
  2122.             isarray: 43,
  2123.             json3: 50
  2124.         }],
  2125.         48: [function(a, b, c) {
  2126.             (function(a) {
  2127.                 function c(b) {
  2128.                     return a.Buffer && a.Buffer.isBuffer(b) || a.ArrayBuffer && b instanceof ArrayBuffer
  2129.                 }
  2130.                 b.exports = c
  2131.             }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {})
  2132.         }, {}],
  2133.         49: [function(a, b, c) {
  2134.             arguments[4][15][0].apply(c, arguments)
  2135.         }, {
  2136.             dup: 15
  2137.         }],
  2138.         50: [function(b, c, d) {
  2139.             (function(b) {
  2140.                 (function() {
  2141.                     function e(a, b) {
  2142.                         function c(a) {
  2143.                             if (c[a] !== q) return c[a];
  2144.                             var e;
  2145.                             if ("bug-string-char-index" == a) e = "a" != "a" [0];
  2146.                             else if ("json" == a) e = c("json-stringify") && c("json-parse");
  2147.                             else {
  2148.                                 var g, h = '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';
  2149.                                 if ("json-stringify" == a) {
  2150.                                     var i = b.stringify,
  2151.                                         k = "function" == typeof i && t;
  2152.                                     if (k) {
  2153.                                         (g = function() {
  2154.                                             return 1
  2155.                                         }).toJSON = g;
  2156.                                         try {
  2157.                                             k = "0" === i(0) && "0" === i(new d) && '""' == i(new f) && i(s) === q && i(q) === q && i() === q && "1" === i(g) && "[1]" == i([g]) && "[null]" == i([q]) && "null" == i(null) && "[null,null,null]" == i([q, s, null]) && i({
  2158.                                                 a: [g, !0, !1, null, "\x00\b\n\f\r  "]
  2159.                                             }) == h && "1" === i(null, g) && "[\n 1,\n 2\n]" == i([1, 2], null, 1) && '"-271821-04-20T00:00:00.000Z"' == i(new j(-864e13)) && '"+275760-09-13T00:00:00.000Z"' == i(new j(864e13)) && '"-000001-01-01T00:00:00.000Z"' == i(new j(-621987552e5)) && '"1969-12-31T23:59:59.999Z"' == i(new j(-1))
  2160.                                         } catch (l) {
  2161.                                             k = !1
  2162.                                         }
  2163.                                     }
  2164.                                     e = k
  2165.                                 }
  2166.                                 if ("json-parse" == a) {
  2167.                                     var m = b.parse;
  2168.                                     if ("function" == typeof m) try {
  2169.                                         if (0 === m("0") && !m(!1)) {
  2170.                                             g = m(h);
  2171.                                             var n = 5 == g.a.length && 1 === g.a[0];
  2172.                                             if (n) {
  2173.                                                 try {
  2174.                                                     n = !m('"   "')
  2175.                                                 } catch (l) {}
  2176.                                                 if (n) try {
  2177.                                                     n = 1 !== m("01")
  2178.                                                 } catch (l) {}
  2179.                                                 if (n) try {
  2180.                                                     n = 1 !== m("1.")
  2181.                                                 } catch (l) {}
  2182.                                             }
  2183.                                         }
  2184.                                     } catch (l) {
  2185.                                         n = !1
  2186.                                     }
  2187.                                     e = n
  2188.                                 }
  2189.                             }
  2190.                             return c[a] = !!e
  2191.                         }
  2192.                         a || (a = i.Object()), b || (b = i.Object());
  2193.                         var d = a.Number || i.Number,
  2194.                             f = a.String || i.String,
  2195.                             h = a.Object || i.Object,
  2196.                             j = a.Date || i.Date,
  2197.                             k = a.SyntaxError || i.SyntaxError,
  2198.                             l = a.TypeError || i.TypeError,
  2199.                             m = a.Math || i.Math,
  2200.                             n = a.JSON || i.JSON;
  2201.                         "object" == typeof n && n && (b.stringify = n.stringify, b.parse = n.parse);
  2202.                         var o, p, q, r = h.prototype,
  2203.                             s = r.toString,
  2204.                             t = new j(-0xc782b5b800cec);
  2205.                         try {
  2206.                             t = -109252 == t.getUTCFullYear() && 0 === t.getUTCMonth() && 1 === t.getUTCDate() && 10 == t.getUTCHours() && 37 == t.getUTCMinutes() && 6 == t.getUTCSeconds() && 708 == t.getUTCMilliseconds()
  2207.                         } catch (u) {}
  2208.                         if (!c("json")) {
  2209.                             var v = "[object Function]",
  2210.                                 w = "[object Date]",
  2211.                                 x = "[object Number]",
  2212.                                 y = "[object String]",
  2213.                                 z = "[object Array]",
  2214.                                 A = "[object Boolean]",
  2215.                                 B = c("bug-string-char-index");
  2216.                             if (!t) var C = m.floor,
  2217.                                 D = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],
  2218.                                 E = function(a, b) {
  2219.                                     return D[b] + 365 * (a - 1970) + C((a - 1969 + (b = +(b > 1))) / 4) - C((a - 1901 + b) / 100) + C((a - 1601 + b) / 400)
  2220.                                 };
  2221.                             if ((o = r.hasOwnProperty) || (o = function(a) {
  2222.                                     var b, c = {};
  2223.                                     return (c.__proto__ = null, c.__proto__ = {
  2224.                                         toString: 1
  2225.                                     }, c).toString != s ? o = function(a) {
  2226.                                         var b = this.__proto__,
  2227.                                             c = a in (this.__proto__ = null, this);
  2228.                                         return this.__proto__ = b, c
  2229.                                     } : (b = c.constructor, o = function(a) {
  2230.                                         var c = (this.constructor || b).prototype;
  2231.                                         return a in this && !(a in c && this[a] === c[a])
  2232.                                     }), c = null, o.call(this, a)
  2233.                                 }), p = function(a, b) {
  2234.                                     var c, d, e, f = 0;
  2235.                                     (c = function() {
  2236.                                         this.valueOf = 0
  2237.                                     }).prototype.valueOf = 0, d = new c;
  2238.                                     for (e in d) o.call(d, e) && f++;
  2239.                                     return c = d = null, f ? p = 2 == f ? function(a, b) {
  2240.                                         var c, d = {},
  2241.                                             e = s.call(a) == v;
  2242.                                         for (c in a) e && "prototype" == c || o.call(d, c) || !(d[c] = 1) || !o.call(a, c) || b(c)
  2243.                                     } : function(a, b) {
  2244.                                         var c, d, e = s.call(a) == v;
  2245.                                         for (c in a) e && "prototype" == c || !o.call(a, c) || (d = "constructor" === c) || b(c);
  2246.                                         (d || o.call(a, c = "constructor")) && b(c)
  2247.                                     } : (d = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"], p = function(a, b) {
  2248.                                         var c, e, f = s.call(a) == v,
  2249.                                             h = !f && "function" != typeof a.constructor && g[typeof a.hasOwnProperty] && a.hasOwnProperty || o;
  2250.                                         for (c in a) f && "prototype" == c || !h.call(a, c) || b(c);
  2251.                                         for (e = d.length; c = d[--e]; h.call(a, c) && b(c));
  2252.                                     }), p(a, b)
  2253.                                 }, !c("json-stringify")) {
  2254.                                 var F = {
  2255.                                         92: "\\\\",
  2256.                                         34: '\\"',
  2257.                                         8: "\\b",
  2258.                                         12: "\\f",
  2259.                                         10: "\\n",
  2260.                                         13: "\\r",
  2261.                                         9: "\\t"
  2262.                                     },
  2263.                                     G = "000000",
  2264.                                     H = function(a, b) {
  2265.                                         return (G + (b || 0)).slice(-a)
  2266.                                     },
  2267.                                     I = "\\u00",
  2268.                                     J = function(a) {
  2269.                                         for (var b = '"', c = 0, d = a.length, e = !B || d > 10, f = e && (B ? a.split("") : a); d > c; c++) {
  2270.                                             var g = a.charCodeAt(c);
  2271.                                             switch (g) {
  2272.                                                 case 8:
  2273.                                                 case 9:
  2274.                                                 case 10:
  2275.                                                 case 12:
  2276.                                                 case 13:
  2277.                                                 case 34:
  2278.                                                 case 92:
  2279.                                                     b += F[g];
  2280.                                                     break;
  2281.                                                 default:
  2282.                                                     if (32 > g) {
  2283.                                                         b += I + H(2, g.toString(16));
  2284.                                                         break
  2285.                                                     }
  2286.                                                     b += e ? f[c] : a.charAt(c)
  2287.                                             }
  2288.                                         }
  2289.                                         return b + '"'
  2290.                                     },
  2291.                                     K = function(a, b, c, d, e, f, g) {
  2292.                                         var h, i, j, k, m, n, r, t, u, v, B, D, F, G, I, L;
  2293.                                         try {
  2294.                                             h = b[a]
  2295.                                         } catch (M) {}
  2296.                                         if ("object" == typeof h && h)
  2297.                                             if (i = s.call(h), i != w || o.call(h, "toJSON")) "function" == typeof h.toJSON && (i != x && i != y && i != z || o.call(h, "toJSON")) && (h = h.toJSON(a));
  2298.                                             else if (h > -1 / 0 && 1 / 0 > h) {
  2299.                                             if (E) {
  2300.                                                 for (m = C(h / 864e5), j = C(m / 365.2425) + 1970 - 1; E(j + 1, 0) <= m; j++);
  2301.                                                 for (k = C((m - E(j, 0)) / 30.42); E(j, k + 1) <= m; k++);
  2302.                                                 m = 1 + m - E(j, k), n = (h % 864e5 + 864e5) % 864e5, r = C(n / 36e5) % 24, t = C(n / 6e4) % 60, u = C(n / 1e3) % 60, v = n % 1e3
  2303.                                             } else j = h.getUTCFullYear(), k = h.getUTCMonth(), m = h.getUTCDate(), r = h.getUTCHours(), t = h.getUTCMinutes(), u = h.getUTCSeconds(), v = h.getUTCMilliseconds();
  2304.                                             h = (0 >= j || j >= 1e4 ? (0 > j ? "-" : "+") + H(6, 0 > j ? -j : j) : H(4, j)) + "-" + H(2, k + 1) + "-" + H(2, m) + "T" + H(2, r) + ":" + H(2, t) + ":" + H(2, u) + "." + H(3, v) + "Z"
  2305.                                         } else h = null;
  2306.                                         if (c && (h = c.call(b, a, h)), null === h) return "null";
  2307.                                         if (i = s.call(h), i == A) return "" + h;
  2308.                                         if (i == x) return h > -1 / 0 && 1 / 0 > h ? "" + h : "null";
  2309.                                         if (i == y) return J("" + h);
  2310.                                         if ("object" == typeof h) {
  2311.                                             for (G = g.length; G--;)
  2312.                                                 if (g[G] === h) throw l();
  2313.                                             if (g.push(h), B = [], I = f, f += e, i == z) {
  2314.                                                 for (F = 0, G = h.length; G > F; F++) D = K(F, h, c, d, e, f, g), B.push(D === q ? "null" : D);
  2315.                                                 L = B.length ? e ? "[\n" + f + B.join(",\n" + f) + "\n" + I + "]" : "[" + B.join(",") + "]" : "[]"
  2316.                                             } else p(d || h, function(a) {
  2317.                                                 var b = K(a, h, c, d, e, f, g);
  2318.                                                 b !== q && B.push(J(a) + ":" + (e ? " " : "") + b)
  2319.                                             }), L = B.length ? e ? "{\n" + f + B.join(",\n" + f) + "\n" + I + "}" : "{" + B.join(",") + "}" : "{}";
  2320.                                             return g.pop(), L
  2321.                                         }
  2322.                                     };
  2323.                                 b.stringify = function(a, b, c) {
  2324.                                     var d, e, f, h;
  2325.                                     if (g[typeof b] && b)
  2326.                                         if ((h = s.call(b)) == v) e = b;
  2327.                                         else if (h == z) {
  2328.                                         f = {};
  2329.                                         for (var i, j = 0, k = b.length; k > j; i = b[j++], h = s.call(i), (h == y || h == x) && (f[i] = 1));
  2330.                                     }
  2331.                                     if (c)
  2332.                                         if ((h = s.call(c)) == x) {
  2333.                                             if ((c -= c % 1) > 0)
  2334.                                                 for (d = "", c > 10 && (c = 10); d.length < c; d += " ");
  2335.                                         } else h == y && (d = c.length <= 10 ? c : c.slice(0, 10));
  2336.                                     return K("", (i = {}, i[""] = a, i), e, f, d, "", [])
  2337.                                 }
  2338.                             }
  2339.                             if (!c("json-parse")) {
  2340.                                 var L, M, N = f.fromCharCode,
  2341.                                     O = {
  2342.                                         92: "\\",
  2343.                                         34: '"',
  2344.                                         47: "/",
  2345.                                         98: "\b",
  2346.                                         116: "  ",
  2347.                                         110: "\n",
  2348.                                         102: "\f",
  2349.                                         114: "\r"
  2350.                                     },
  2351.                                     P = function() {
  2352.                                         throw L = M = null, k()
  2353.                                     },
  2354.                                     Q = function() {
  2355.                                         for (var a, b, c, d, e, f = M, g = f.length; g > L;) switch (e = f.charCodeAt(L)) {
  2356.                                             case 9:
  2357.                                             case 10:
  2358.                                             case 13:
  2359.                                             case 32:
  2360.                                                 L++;
  2361.                                                 break;
  2362.                                             case 123:
  2363.                                             case 125:
  2364.                                             case 91:
  2365.                                             case 93:
  2366.                                             case 58:
  2367.                                             case 44:
  2368.                                                 return a = B ? f.charAt(L) : f[L], L++, a;
  2369.                                             case 34:
  2370.                                                 for (a = "@", L++; g > L;)
  2371.                                                     if (e = f.charCodeAt(L), 32 > e) P();
  2372.                                                     else if (92 == e) switch (e = f.charCodeAt(++L)) {
  2373.                                                     case 92:
  2374.                                                     case 34:
  2375.                                                     case 47:
  2376.                                                     case 98:
  2377.                                                     case 116:
  2378.                                                     case 110:
  2379.                                                     case 102:
  2380.                                                     case 114:
  2381.                                                         a += O[e], L++;
  2382.                                                         break;
  2383.                                                     case 117:
  2384.                                                         for (b = ++L, c = L + 4; c > L; L++) e = f.charCodeAt(L), e >= 48 && 57 >= e || e >= 97 && 102 >= e || e >= 65 && 70 >= e || P();
  2385.                                                         a += N("0x" + f.slice(b, L));
  2386.                                                         break;
  2387.                                                     default:
  2388.                                                         P()
  2389.                                                 } else {
  2390.                                                     if (34 == e) break;
  2391.                                                     for (e = f.charCodeAt(L), b = L; e >= 32 && 92 != e && 34 != e;) e = f.charCodeAt(++L);
  2392.                                                     a += f.slice(b, L)
  2393.                                                 }
  2394.                                                 if (34 == f.charCodeAt(L)) return L++, a;
  2395.                                                 P();
  2396.                                             default:
  2397.                                                 if (b = L, 45 == e && (d = !0, e = f.charCodeAt(++L)), e >= 48 && 57 >= e) {
  2398.                                                     for (48 == e && (e = f.charCodeAt(L + 1), e >= 48 && 57 >= e) && P(), d = !1; g > L && (e = f.charCodeAt(L), e >= 48 && 57 >= e); L++);
  2399.                                                     if (46 == f.charCodeAt(L)) {
  2400.                                                         for (c = ++L; g > c && (e = f.charCodeAt(c), e >= 48 && 57 >= e); c++);
  2401.                                                         c == L && P(), L = c
  2402.                                                     }
  2403.                                                     if (e = f.charCodeAt(L), 101 == e || 69 == e) {
  2404.                                                         for (e = f.charCodeAt(++L), (43 == e || 45 == e) && L++, c = L; g > c && (e = f.charCodeAt(c), e >= 48 && 57 >= e); c++);
  2405.                                                         c == L && P(), L = c
  2406.                                                     }
  2407.                                                     return +f.slice(b, L)
  2408.                                                 }
  2409.                                                 if (d && P(), "true" == f.slice(L, L + 4)) return L += 4, !0;
  2410.                                                 if ("false" == f.slice(L, L + 5)) return L += 5, !1;
  2411.                                                 if ("null" == f.slice(L, L + 4)) return L += 4, null;
  2412.                                                 P()
  2413.                                         }
  2414.                                         return "$"
  2415.                                     },
  2416.                                     R = function(a) {
  2417.                                         var b, c;
  2418.                                         if ("$" == a && P(), "string" == typeof a) {
  2419.                                             if ("@" == (B ? a.charAt(0) : a[0])) return a.slice(1);
  2420.                                             if ("[" == a) {
  2421.                                                 for (b = []; a = Q(), "]" != a; c || (c = !0)) c && ("," == a ? (a = Q(), "]" == a && P()) : P()), "," == a && P(), b.push(R(a));
  2422.                                                 return b
  2423.                                             }
  2424.                                             if ("{" == a) {
  2425.                                                 for (b = {}; a = Q(), "}" != a; c || (c = !0)) c && ("," == a ? (a = Q(), "}" == a && P()) : P()), ("," == a || "string" != typeof a || "@" != (B ? a.charAt(0) : a[0]) || ":" != Q()) && P(), b[a.slice(1)] = R(Q());
  2426.                                                 return b
  2427.                                             }
  2428.                                             P()
  2429.                                         }
  2430.                                         return a
  2431.                                     },
  2432.                                     S = function(a, b, c) {
  2433.                                         var d = T(a, b, c);
  2434.                                         d === q ? delete a[b] : a[b] = d
  2435.                                     },
  2436.                                     T = function(a, b, c) {
  2437.                                         var d, e = a[b];
  2438.                                         if ("object" == typeof e && e)
  2439.                                             if (s.call(e) == z)
  2440.                                                 for (d = e.length; d--;) S(e, d, c);
  2441.                                             else p(e, function(a) {
  2442.                                                 S(e, a, c)
  2443.                                             });
  2444.                                         return c.call(a, b, e)
  2445.                                     };
  2446.                                 b.parse = function(a, b) {
  2447.                                     var c, d;
  2448.                                     return L = 0, M = "" + a, c = R(Q()), "$" != Q() && P(), L = M = null, b && s.call(b) == v ? T((d = {}, d[""] = c, d), "", b) : c
  2449.                                 }
  2450.                             }
  2451.                         }
  2452.                         return b.runInContext = e, b
  2453.                     }
  2454.                     var f = "function" == typeof a && a.amd,
  2455.                         g = {
  2456.                             "function": !0,
  2457.                             object: !0
  2458.                         },
  2459.                         h = g[typeof d] && d && !d.nodeType && d,
  2460.                         i = g[typeof window] && window || this,
  2461.                         j = h && g[typeof c] && c && !c.nodeType && "object" == typeof b && b;
  2462.                     if (!j || j.global !== j && j.window !== j && j.self !== j || (i = j), h && !f) e(i, h);
  2463.                     else {
  2464.                         var k = i.JSON,
  2465.                             l = i.JSON3,
  2466.                             m = !1,
  2467.                             n = e(i, i.JSON3 = {
  2468.                                 noConflict: function() {
  2469.                                     return m || (m = !0, i.JSON = k, i.JSON3 = l, k = l = null), n
  2470.                                 }
  2471.                             });
  2472.                         i.JSON = {
  2473.                             parse: n.parse,
  2474.                             stringify: n.stringify
  2475.                         }
  2476.                     }
  2477.                     f && a(function() {
  2478.                         return n
  2479.                     })
  2480.                 }).call(this)
  2481.             }).call(this, "undefined" != typeof self ? self : "undefined" != typeof window ? window : "undefined" != typeof global ? global : {})
  2482.         }, {}],
  2483.         51: [function(a, b, c) {
  2484.             function d(a, b) {
  2485.                 var c = [];
  2486.                 b = b || 0;
  2487.                 for (var d = b || 0; d < a.length; d++) c[d - b] = a[d];
  2488.                 return c
  2489.             }
  2490.             b.exports = d
  2491.         }, {}]
  2492.     }, {}, [31])(31)
  2493. }),
  2494. function() {
  2495.     function a(a) {
  2496.         function c(b) {
  2497.             return b = b || {
  2498.                 prefix: !0
  2499.             }, "object" != typeof console || "function" != typeof console.log || "function" != typeof console.log.bind ? function() {} : function() {
  2500.                 var c = Array.prototype.slice.call(arguments);
  2501.                 if ("production" !== a.sails.environment) {
  2502.                     var d = "";
  2503.                     b.prefix && c.unshift(d), console.log.bind(console).apply(this, c)
  2504.                 }
  2505.             }
  2506.         }
  2507.  
  2508.         function f(a) {
  2509.             var b = a.requestQueue;
  2510.             if (b) {
  2511.                 for (var c in b) {
  2512.                     var d = {}.hasOwnProperty.call(b, c);
  2513.                     if (d) {
  2514.                         var e = b[c];
  2515.                         a.request.apply(a, e)
  2516.                     }
  2517.                 }
  2518.                 b = null
  2519.             }
  2520.         }
  2521.  
  2522.         function g(a, b) {
  2523.             if (a = a || {}, "undefined" == typeof window) return b();
  2524.             var c = document.createElement("script");
  2525.             window._sailsIoJSConnect = function(a) {
  2526.                 c.parentNode.removeChild(c), b(a)
  2527.             }, c.src = a.url, document.getElementsByTagName("head")[0].appendChild(c)
  2528.         }
  2529.  
  2530.         function h(a) {
  2531.             this.body = a.body || {}, this.headers = a.headers || {}, this.statusCode = a.statusCode || 200, (this.statusCode < 200 || this.statusCode >= 400) && (this.error = this.body || this.statusCode)
  2532.         }
  2533.  
  2534.         function i(a, b) {
  2535.             if (!a._raw) throw new Error("Failed to emit from socket- raw SIO socket is missing.");
  2536.             var c = b.cb;
  2537.             delete b.cb;
  2538.             var d = b.method;
  2539.             a._raw.emit(d, b, function(a) {
  2540.                 c && c(a.body, new h(a))
  2541.             })
  2542.         }
  2543.  
  2544.         function j(b) {
  2545.             var c = this;
  2546.             b = b || {};
  2547.             var d = {};
  2548.             ["useCORSRouteToGetCookie", "url", "multiplex", "transports", "query", "initialConnectionHeaders"].forEach(function(b) {
  2549.                 Object.defineProperty(c, b, {
  2550.                     get: function() {
  2551.                         return "url" == b ? d[b] || c._raw && c._raw.io && c._raw.io.uri : d[b]
  2552.                     },
  2553.                     set: function(e) {
  2554.                         if (c.isConnected() && a.sails.strict !== !1 && e != d[b]) throw new Error("Cannot change value of `" + b + "` while socket is connected.");
  2555.                         d[b] = e
  2556.                     }
  2557.                 })
  2558.             }), c.useCORSRouteToGetCookie = b.useCORSRouteToGetCookie, c.url = b.url, c.multiplex = b.multiplex, c.transports = b.transports, c.query = b.query, c.headers = b.headers, c.initialConnectionHeaders = b.initialConnectionHeaders, c.eventQueue = {}, c.on("sails:parseError", function(a) {
  2559.                 k("Sails encountered an error parsing a socket message sent from this client, and did not have access to a callback function to respond with."), k("Error details:", a)
  2560.             })
  2561.         }
  2562.         if (a || (a = e), !a) throw new Error("`sails.io.js` requires a socket.io client, but `io` was not passed in.");
  2563.         var k = c();
  2564.         return k.noPrefix = c({
  2565.             prefix: !1
  2566.         }), h.prototype.toString = function() {
  2567.             return "[ResponseFromSails]  -- Status: " + this.statusCode + "  -- Headers: " + this.headers + "  -- Body: " + this.body
  2568.         }, h.prototype.toPOJO = function() {
  2569.             return {
  2570.                 body: this.body,
  2571.                 headers: this.headers,
  2572.                 statusCode: this.statusCode
  2573.             }
  2574.         }, h.prototype.pipe = function() {
  2575.             return new Error("Client-side streaming support not implemented yet.")
  2576.         }, j.prototype._connect = function() {
  2577.             var b = this;
  2578.             b.isConnecting = !0, b.useCORSRouteToGetCookie = b.useCORSRouteToGetCookie || a.sails.useCORSRouteToGetCookie, b.url = b.url || a.sails.url, b.transports = b.transports || a.sails.transports, b.query = b.query || a.sails.query, b.headers = b.headers || a.sails.headers, b.extraHeaders = b.initialConnectionHeaders || a.sails.initialConnectionHeaders || {}, "object" == typeof module && "undefined" != typeof module.exports || console.warn("initialConnectionHeaders option available in Node.js only!"), b.path = b.path || a.sails.path, b.url = b.url ? b.url.replace(/(\/)$/, "") : void 0, "string" != typeof b.query ? b.query = d.versionString : b.query += "&" + d.versionString;
  2579.             var c = function() {
  2580.                 if ("undefined" == typeof window || "undefined" == typeof window.location) return !1;
  2581.                 if ("string" != typeof b.url) return !1;
  2582.                 var a = function() {
  2583.                         try {
  2584.                             a = b.url.match(/^([a-z]+:\/\/)/i)[1].toLowerCase()
  2585.                         } catch (c) {}
  2586.                         return a = a || "http://"
  2587.                     }(),
  2588.                     c = !!b.url.match("^https"),
  2589.                     d = function() {
  2590.                         try {
  2591.                             return b.url.match(/^[a-z]+:\/\/[^:]*:([0-9]*)/i)[1]
  2592.                         } catch (a) {}
  2593.                         return c ? "443" : "80"
  2594.                     }(),
  2595.                     e = b.url.replace(/^([a-z]+:\/\/)/i, "");
  2596.                 if (a.replace(/[:\/]/g, "") !== window.location.protocol.replace(/[:\/]/g, "")) return !0;
  2597.                 var f = 0 === e.search(window.location.hostname);
  2598.                 if (!f) return !0;
  2599.                 var g = window.location.protocol.match(/https/i),
  2600.                     h = window.location.port + "" || (g ? "443" : "80");
  2601.                 return d !== h
  2602.             }();
  2603.             ! function(a) {
  2604.                 if (!b.useCORSRouteToGetCookie || !c) return a();
  2605.                 var d = b.url;
  2606.                 if (d += "string" == typeof b.useCORSRouteToGetCookie ? b.useCORSRouteToGetCookie : "/__getcookie", "undefined" != typeof window) return void g({
  2607.                     url: d,
  2608.                     method: "GET"
  2609.                 }, a);
  2610.                 var e = require("request");
  2611.                 e.get(d, function(c, d, e) {
  2612.                     return c ? (b.isConnecting = !1, void k("Failed to connect socket (failed to get cookie)", "Error:", c)) : void a()
  2613.                 })
  2614.             }(function() {
  2615.                 b._raw = a(b.url, b), b.replay(), b.on("connect", function() {
  2616.                     b.isConnecting = !1, k.noPrefix("\n\n  |>    Now connected to Sails.\n\\___/   For help, see: http://bit.ly/1DmTvgK\n        (using sails.io.js " + a.sails.sdk.platform + " SDK @v" + a.sails.sdk.version + ")\n\n\n")
  2617.                 }), b.on("disconnect", function() {
  2618.                     b.connectionLostTimestamp = (new Date).getTime(), k("===================================="), k("Socket was disconnected from Sails."), k("Usually, this is due to one of the following reasons:\n -> the server " + (b.url ? b.url + " " : "") + "was taken down\n -> your browser lost internet connectivity"), k("====================================")
  2619.                 }), b.on("reconnecting", function(a) {
  2620.                     k("\n        Socket is trying to reconnect to Sails...\n_-|>_-  (attempt #" + a + ")\n\n")
  2621.                 }), b.on("reconnect", function(a, c) {
  2622.                     var d = (new Date).getTime() - b.connectionLostTimestamp,
  2623.                         e = d / 1e3;
  2624.                     k("\n  |>    Socket reconnected successfully after\n\\___/   being offline for ~" + e + " seconds.\n\n")
  2625.                 }), b.on("error", function(a) {
  2626.                     b.isConnecting = !1, k("Failed to connect socket (probably due to failed authorization on server)", "Error:", a)
  2627.                 })
  2628.             })
  2629.         }, j.prototype.reconnect = function() {
  2630.             if (this.isConnecting) throw new Error("Cannot connect- socket is already connecting");
  2631.             if (this.isConnected()) throw new Error("Cannot connect- socket is already connected");
  2632.             return this._connect()
  2633.         }, j.prototype.disconnect = function() {
  2634.             if (this.isConnecting = !1, !this.isConnected()) throw new Error("Cannot disconnect- socket is already disconnected");
  2635.             return this._raw.disconnect()
  2636.         }, j.prototype.isConnected = function() {
  2637.             return this._raw ? !!this._raw.connected : !1
  2638.         }, j.prototype.replay = function() {
  2639.             var a = this;
  2640.             for (var b in a.eventQueue)
  2641.                 for (var c in a.eventQueue[b]) a._raw.on(b, a.eventQueue[b][c]);
  2642.             if (a.isConnected()) f(a);
  2643.             else {
  2644.                 var d = !1;
  2645.                 a._raw.on("connect", function() {
  2646.                     d || (f(a), d = !0)
  2647.                 })
  2648.             }
  2649.             return a
  2650.         }, j.prototype.on = function(a, b) {
  2651.             return this._raw ? (this._raw.on(a, b), this) : (this.eventQueue[a] ? this.eventQueue[a].push(b) : this.eventQueue[a] = [b], this)
  2652.         }, j.prototype.off = function(a, b) {
  2653.             return this._raw ? (this._raw.off(a, b), this) : (this.eventQueue[a] && this.eventQueue[a].indexOf(b) > -1 && this.eventQueue[a].splice(this.eventQueue[a].indexOf(b), 1), this)
  2654.         }, j.prototype.removeAllListeners = function() {
  2655.             return this._raw ? (this._raw.removeAllListeners(), this) : (this.eventQueue = {}, this)
  2656.         }, j.prototype.get = function(a, b, c) {
  2657.             return "function" == typeof b && (c = b, b = {}), this.request({
  2658.                 method: "get",
  2659.                 params: b,
  2660.                 url: a
  2661.             }, c)
  2662.         }, j.prototype.post = function(a, b, c) {
  2663.             return "function" == typeof b && (c = b, b = {}), this.request({
  2664.                 method: "post",
  2665.                 data: b,
  2666.                 url: a
  2667.             }, c)
  2668.         }, j.prototype.put = function(a, b, c) {
  2669.             return "function" == typeof b && (c = b, b = {}), this.request({
  2670.                 method: "put",
  2671.                 params: b,
  2672.                 url: a
  2673.             }, c)
  2674.         }, j.prototype["delete"] = function(a, b, c) {
  2675.             return "function" == typeof b && (c = b, b = {}), this.request({
  2676.                 method: "delete",
  2677.                 params: b,
  2678.                 url: a
  2679.             }, c)
  2680.         }, j.prototype.request = function(a, b) {
  2681.             var c = 'Usage:\nsocket.request( options, [fnToCallWhenComplete] )\n\noptions.url :: e.g. "/foo/bar"\noptions.method :: e.g. "get", "post", "put", or "delete", etc.\noptions.params :: e.g. { emailAddress: "mike@sailsjs.org" }\noptions.headers :: e.g. { "x-my-custom-header": "some string" }';
  2682.             if ("object" != typeof a || "string" != typeof a.url) throw new Error("Invalid or missing URL!\n" + c);
  2683.             if (a.method && "string" != typeof a.method) throw new Error('Invalid `method` provided (should be a string like "post" or "put")\n' + c);
  2684.             if (a.headers && "object" != typeof a.headers) throw new Error("Invalid `headers` provided (should be a dictionary with string values)\n" + c);
  2685.             if (a.params && "object" != typeof a.params) throw new Error("Invalid `params` provided (should be a dictionary with JSON-serializable values)\n" + c);
  2686.             if (a.data && "object" != typeof a.data) throw new Error("Invalid `data` provided (should be a dictionary with JSON-serializable values)\n" + c);
  2687.             if (b && "function" != typeof b) throw new Error("Invalid callback function!\n" + c);
  2688.             if (a.data && a.params) throw new Error("Cannot specify both `params` and `data`!  They are aliases of each other.\n" + c);
  2689.             if (a.data && (a.params = a.data), !this.isConnected()) return this.requestQueue = this.requestQueue || [], void this.requestQueue.push([a, b]);
  2690.             a.headers = a.headers || {};
  2691.             var d = {
  2692.                 method: a.method.toLowerCase() || "get",
  2693.                 headers: a.headers,
  2694.                 data: a.params || a.data || {},
  2695.                 url: a.url.replace(/^(.+)\/*\s*$/, "$1"),
  2696.                 cb: b
  2697.             };
  2698.             if (this.headers && "object" == typeof this.headers)
  2699.                 for (var e in this.headers) a.headers.hasOwnProperty(e) || (a.headers[e] = this.headers[e]);
  2700.             i(this, d)
  2701.         }, j.prototype._request = function(a, b) {
  2702.             throw new Error("`_request()` was a private API deprecated as of v0.11 of the sails.io.js client. Use `.request()` instead.")
  2703.         }, a.sails = {
  2704.             autoConnect: !0,
  2705.             useCORSRouteToGetCookie: !0,
  2706.             environment: b.match(/(\#production|\.min\.js)/g) ? "production" : "development",
  2707.             sdk: d,
  2708.             transports: ["polling", "websocket"]
  2709.         }, a.sails.connect = function(a, b) {
  2710.             "object" == typeof a && (b = a, a = null), b = b || {}, b.url = a || b.url || void 0;
  2711.             var c = new j(b);
  2712.             return c._connect(), c
  2713.         }, a.socket = new j, setTimeout(function() {
  2714.             return a.sails.autoConnect ? void a.socket._connect() : void delete a.socket
  2715.         }, 0), a
  2716.     }
  2717.     var b = function() {
  2718.             if ("object" != typeof window || "object" != typeof window.document || "function" != typeof window.document.getElementsByTagName) return "";
  2719.             var a = window.document.getElementsByTagName("script"),
  2720.                 b = a[a.length - 1];
  2721.             return b.src
  2722.         }(),
  2723.         c = {
  2724.             version: "__sails_io_sdk_version",
  2725.             platform: "__sails_io_sdk_platform",
  2726.             language: "__sails_io_sdk_language"
  2727.         },
  2728.         d = {
  2729.             version: "0.13.4",
  2730.             platform: "undefined" == typeof module ? "browser" : "node",
  2731.             language: "javascript"
  2732.         };
  2733.     d.versionString = c.version + "=" + d.version + "&" + c.platform + "=" + d.platform + "&" + c.language + "=" + d.language;
  2734.     var e = "undefined" != typeof io ? io : null;
  2735.     return "object" == typeof module && "undefined" != typeof module.exports ? (module.exports = a, a) : "function" == typeof define && define.amd ? void define([], function() {
  2736.         return a
  2737.     }) : a()
  2738. }(),
  2739. function(a, b) {
  2740.     "object" == typeof exports && "undefined" != typeof module ? module.exports = b() : "function" == typeof define && define.amd ? define(b) : a.moment = b()
  2741. }(this, function() {
  2742.     "use strict";
  2743.  
  2744.     function a() {
  2745.         return Zc.apply(null, arguments)
  2746.     }
  2747.  
  2748.     function b(a) {
  2749.         Zc = a
  2750.     }
  2751.  
  2752.     function c(a) {
  2753.         return a instanceof Array || "[object Array]" === Object.prototype.toString.call(a)
  2754.     }
  2755.  
  2756.     function d(a) {
  2757.         return a instanceof Date || "[object Date]" === Object.prototype.toString.call(a)
  2758.     }
  2759.  
  2760.     function e(a, b) {
  2761.         var c, d = [];
  2762.         for (c = 0; c < a.length; ++c) d.push(b(a[c], c));
  2763.         return d
  2764.     }
  2765.  
  2766.     function f(a, b) {
  2767.         return Object.prototype.hasOwnProperty.call(a, b)
  2768.     }
  2769.  
  2770.     function g(a, b) {
  2771.         for (var c in b) f(b, c) && (a[c] = b[c]);
  2772.         return f(b, "toString") && (a.toString = b.toString), f(b, "valueOf") && (a.valueOf = b.valueOf), a
  2773.     }
  2774.  
  2775.     function h(a, b, c, d) {
  2776.         return Ia(a, b, c, d, !0).utc()
  2777.     }
  2778.  
  2779.     function i() {
  2780.         return {
  2781.             empty: !1,
  2782.             unusedTokens: [],
  2783.             unusedInput: [],
  2784.             overflow: -2,
  2785.             charsLeftOver: 0,
  2786.             nullInput: !1,
  2787.             invalidMonth: null,
  2788.             invalidFormat: !1,
  2789.             userInvalidated: !1,
  2790.             iso: !1
  2791.         }
  2792.     }
  2793.  
  2794.     function j(a) {
  2795.         return null == a._pf && (a._pf = i()), a._pf
  2796.     }
  2797.  
  2798.     function k(a) {
  2799.         if (null == a._isValid) {
  2800.             var b = j(a);
  2801.             a._isValid = !(isNaN(a._d.getTime()) || !(b.overflow < 0) || b.empty || b.invalidMonth || b.invalidWeekday || b.nullInput || b.invalidFormat || b.userInvalidated), a._strict && (a._isValid = a._isValid && 0 === b.charsLeftOver && 0 === b.unusedTokens.length && void 0 === b.bigHour)
  2802.         }
  2803.         return a._isValid
  2804.     }
  2805.  
  2806.     function l(a) {
  2807.         var b = h(NaN);
  2808.         return null != a ? g(j(b), a) : j(b).userInvalidated = !0, b
  2809.     }
  2810.  
  2811.     function m(a) {
  2812.         return void 0 === a
  2813.     }
  2814.  
  2815.     function n(a, b) {
  2816.         var c, d, e;
  2817.         if (m(b._isAMomentObject) || (a._isAMomentObject = b._isAMomentObject), m(b._i) || (a._i = b._i), m(b._f) || (a._f = b._f), m(b._l) || (a._l = b._l), m(b._strict) || (a._strict = b._strict), m(b._tzm) || (a._tzm = b._tzm), m(b._isUTC) || (a._isUTC = b._isUTC), m(b._offset) || (a._offset = b._offset), m(b._pf) || (a._pf = j(b)), m(b._locale) || (a._locale = b._locale), $c.length > 0)
  2818.             for (c in $c) d = $c[c], e = b[d], m(e) || (a[d] = e);
  2819.         return a
  2820.     }
  2821.  
  2822.     function o(b) {
  2823.         n(this, b), this._d = new Date(null != b._d ? b._d.getTime() : NaN), _c === !1 && (_c = !0, a.updateOffset(this), _c = !1)
  2824.     }
  2825.  
  2826.     function p(a) {
  2827.         return a instanceof o || null != a && null != a._isAMomentObject
  2828.     }
  2829.  
  2830.     function q(a) {
  2831.         return 0 > a ? Math.ceil(a) : Math.floor(a)
  2832.     }
  2833.  
  2834.     function r(a) {
  2835.         var b = +a,
  2836.             c = 0;
  2837.         return 0 !== b && isFinite(b) && (c = q(b)), c
  2838.     }
  2839.  
  2840.     function s(a, b, c) {
  2841.         var d, e = Math.min(a.length, b.length),
  2842.             f = Math.abs(a.length - b.length),
  2843.             g = 0;
  2844.         for (d = 0; e > d; d++)(c && a[d] !== b[d] || !c && r(a[d]) !== r(b[d])) && g++;
  2845.         return g + f
  2846.     }
  2847.  
  2848.     function t(b) {
  2849.         a.suppressDeprecationWarnings === !1 && "undefined" != typeof console && console.warn && console.warn("Deprecation warning: " + b)
  2850.     }
  2851.  
  2852.     function u(a, b) {
  2853.         var c = !0;
  2854.         return g(function() {
  2855.             return c && (t(a + "\nArguments: " + Array.prototype.slice.call(arguments).join(", ") + "\n" + (new Error).stack), c = !1), b.apply(this, arguments)
  2856.         }, b)
  2857.     }
  2858.  
  2859.     function v(a, b) {
  2860.         ad[a] || (t(b), ad[a] = !0)
  2861.     }
  2862.  
  2863.     function w(a) {
  2864.         return a instanceof Function || "[object Function]" === Object.prototype.toString.call(a)
  2865.     }
  2866.  
  2867.     function x(a) {
  2868.         return "[object Object]" === Object.prototype.toString.call(a)
  2869.     }
  2870.  
  2871.     function y(a) {
  2872.         var b, c;
  2873.         for (c in a) b = a[c], w(b) ? this[c] = b : this["_" + c] = b;
  2874.         this._config = a, this._ordinalParseLenient = new RegExp(this._ordinalParse.source + "|" + /\d{1,2}/.source)
  2875.     }
  2876.  
  2877.     function z(a, b) {
  2878.         var c, d = g({}, a);
  2879.         for (c in b) f(b, c) && (x(a[c]) && x(b[c]) ? (d[c] = {}, g(d[c], a[c]), g(d[c], b[c])) : null != b[c] ? d[c] = b[c] : delete d[c]);
  2880.         return d
  2881.     }
  2882.  
  2883.     function A(a) {
  2884.         null != a && this.set(a)
  2885.     }
  2886.  
  2887.     function B(a) {
  2888.         return a ? a.toLowerCase().replace("_", "-") : a
  2889.     }
  2890.  
  2891.     function C(a) {
  2892.         for (var b, c, d, e, f = 0; f < a.length;) {
  2893.             for (e = B(a[f]).split("-"), b = e.length, c = B(a[f + 1]), c = c ? c.split("-") : null; b > 0;) {
  2894.                 if (d = D(e.slice(0, b).join("-"))) return d;
  2895.                 if (c && c.length >= b && s(e, c, !0) >= b - 1) break;
  2896.                 b--
  2897.             }
  2898.             f++
  2899.         }
  2900.         return null
  2901.     }
  2902.  
  2903.     function D(a) {
  2904.         var b = null;
  2905.         if (!cd[a] && "undefined" != typeof module && module && module.exports) try {
  2906.             b = bd._abbr, require("./locale/" + a), E(b)
  2907.         } catch (c) {}
  2908.         return cd[a]
  2909.     }
  2910.  
  2911.     function E(a, b) {
  2912.         var c;
  2913.         return a && (c = m(b) ? H(a) : F(a, b), c && (bd = c)), bd._abbr
  2914.     }
  2915.  
  2916.     function F(a, b) {
  2917.         return null !== b ? (b.abbr = a, null != cd[a] ? (v("defineLocaleOverride", "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"), b = z(cd[a]._config, b)) : null != b.parentLocale && (null != cd[b.parentLocale] ? b = z(cd[b.parentLocale]._config, b) : v("parentLocaleUndefined", "specified parentLocale is not defined yet")), cd[a] = new A(b), E(a), cd[a]) : (delete cd[a], null)
  2918.     }
  2919.  
  2920.     function G(a, b) {
  2921.         if (null != b) {
  2922.             var c;
  2923.             null != cd[a] && (b = z(cd[a]._config, b)), c = new A(b), c.parentLocale = cd[a], cd[a] = c, E(a)
  2924.         } else null != cd[a] && (null != cd[a].parentLocale ? cd[a] = cd[a].parentLocale : null != cd[a] && delete cd[a]);
  2925.         return cd[a]
  2926.     }
  2927.  
  2928.     function H(a) {
  2929.         var b;
  2930.         if (a && a._locale && a._locale._abbr && (a = a._locale._abbr), !a) return bd;
  2931.         if (!c(a)) {
  2932.             if (b = D(a)) return b;
  2933.             a = [a]
  2934.         }
  2935.         return C(a)
  2936.     }
  2937.  
  2938.     function I() {
  2939.         return Object.keys(cd)
  2940.     }
  2941.  
  2942.     function J(a, b) {
  2943.         var c = a.toLowerCase();
  2944.         dd[c] = dd[c + "s"] = dd[b] = a
  2945.     }
  2946.  
  2947.     function K(a) {
  2948.         return "string" == typeof a ? dd[a] || dd[a.toLowerCase()] : void 0
  2949.     }
  2950.  
  2951.     function L(a) {
  2952.         var b, c, d = {};
  2953.         for (c in a) f(a, c) && (b = K(c), b && (d[b] = a[c]));
  2954.         return d
  2955.     }
  2956.  
  2957.     function M(b, c) {
  2958.         return function(d) {
  2959.             return null != d ? (O(this, b, d), a.updateOffset(this, c), this) : N(this, b)
  2960.         }
  2961.     }
  2962.  
  2963.     function N(a, b) {
  2964.         return a.isValid() ? a._d["get" + (a._isUTC ? "UTC" : "") + b]() : NaN
  2965.     }
  2966.  
  2967.     function O(a, b, c) {
  2968.         a.isValid() && a._d["set" + (a._isUTC ? "UTC" : "") + b](c)
  2969.     }
  2970.  
  2971.     function P(a, b) {
  2972.         var c;
  2973.         if ("object" == typeof a)
  2974.             for (c in a) this.set(c, a[c]);
  2975.         else if (a = K(a), w(this[a])) return this[a](b);
  2976.         return this
  2977.     }
  2978.  
  2979.     function Q(a, b, c) {
  2980.         var d = "" + Math.abs(a),
  2981.             e = b - d.length,
  2982.             f = a >= 0;
  2983.         return (f ? c ? "+" : "" : "-") + Math.pow(10, Math.max(0, e)).toString().substr(1) + d
  2984.     }
  2985.  
  2986.     function R(a, b, c, d) {
  2987.         var e = d;
  2988.         "string" == typeof d && (e = function() {
  2989.             return this[d]()
  2990.         }), a && (hd[a] = e), b && (hd[b[0]] = function() {
  2991.             return Q(e.apply(this, arguments), b[1], b[2])
  2992.         }), c && (hd[c] = function() {
  2993.             return this.localeData().ordinal(e.apply(this, arguments), a)
  2994.         })
  2995.     }
  2996.  
  2997.     function S(a) {
  2998.         return a.match(/\[[\s\S]/) ? a.replace(/^\[|\]$/g, "") : a.replace(/\\/g, "")
  2999.     }
  3000.  
  3001.     function T(a) {
  3002.         var b, c, d = a.match(ed);
  3003.         for (b = 0, c = d.length; c > b; b++) hd[d[b]] ? d[b] = hd[d[b]] : d[b] = S(d[b]);
  3004.         return function(e) {
  3005.             var f = "";
  3006.             for (b = 0; c > b; b++) f += d[b] instanceof Function ? d[b].call(e, a) : d[b];
  3007.             return f
  3008.         }
  3009.     }
  3010.  
  3011.     function U(a, b) {
  3012.         return a.isValid() ? (b = V(b, a.localeData()), gd[b] = gd[b] || T(b), gd[b](a)) : a.localeData().invalidDate()
  3013.     }
  3014.  
  3015.     function V(a, b) {
  3016.         function c(a) {
  3017.             return b.longDateFormat(a) || a
  3018.         }
  3019.         var d = 5;
  3020.         for (fd.lastIndex = 0; d >= 0 && fd.test(a);) a = a.replace(fd, c), fd.lastIndex = 0, d -= 1;
  3021.         return a
  3022.     }
  3023.  
  3024.     function W(a, b, c) {
  3025.         zd[a] = w(b) ? b : function(a, d) {
  3026.             return a && c ? c : b
  3027.         }
  3028.     }
  3029.  
  3030.     function X(a, b) {
  3031.         return f(zd, a) ? zd[a](b._strict, b._locale) : new RegExp(Y(a))
  3032.     }
  3033.  
  3034.     function Y(a) {
  3035.         return Z(a.replace("\\", "").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function(a, b, c, d, e) {
  3036.             return b || c || d || e
  3037.         }))
  3038.     }
  3039.  
  3040.     function Z(a) {
  3041.         return a.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&")
  3042.     }
  3043.  
  3044.     function $(a, b) {
  3045.         var c, d = b;
  3046.         for ("string" == typeof a && (a = [a]), "number" == typeof b && (d = function(a, c) {
  3047.                 c[b] = r(a)
  3048.             }), c = 0; c < a.length; c++) Ad[a[c]] = d
  3049.     }
  3050.  
  3051.     function _(a, b) {
  3052.         $(a, function(a, c, d, e) {
  3053.             d._w = d._w || {}, b(a, d._w, d, e)
  3054.         })
  3055.     }
  3056.  
  3057.     function aa(a, b, c) {
  3058.         null != b && f(Ad, a) && Ad[a](b, c._a, c, a)
  3059.     }
  3060.  
  3061.     function ba(a, b) {
  3062.         return new Date(Date.UTC(a, b + 1, 0)).getUTCDate()
  3063.     }
  3064.  
  3065.     function ca(a, b) {
  3066.         return c(this._months) ? this._months[a.month()] : this._months[Kd.test(b) ? "format" : "standalone"][a.month()]
  3067.     }
  3068.  
  3069.     function da(a, b) {
  3070.         return c(this._monthsShort) ? this._monthsShort[a.month()] : this._monthsShort[Kd.test(b) ? "format" : "standalone"][a.month()]
  3071.     }
  3072.  
  3073.     function ea(a, b, c) {
  3074.         var d, e, f;
  3075.         for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), d = 0; 12 > d; d++) {
  3076.             if (e = h([2e3, d]), c && !this._longMonthsParse[d] && (this._longMonthsParse[d] = new RegExp("^" + this.months(e, "").replace(".", "") + "$", "i"), this._shortMonthsParse[d] = new RegExp("^" + this.monthsShort(e, "").replace(".", "") + "$", "i")), c || this._monthsParse[d] || (f = "^" + this.months(e, "") + "|^" + this.monthsShort(e, ""), this._monthsParse[d] = new RegExp(f.replace(".", ""), "i")), c && "MMMM" === b && this._longMonthsParse[d].test(a)) return d;
  3077.             if (c && "MMM" === b && this._shortMonthsParse[d].test(a)) return d;
  3078.             if (!c && this._monthsParse[d].test(a)) return d
  3079.         }
  3080.     }
  3081.  
  3082.     function fa(a, b) {
  3083.         var c;
  3084.         if (!a.isValid()) return a;
  3085.         if ("string" == typeof b)
  3086.             if (/^\d+$/.test(b)) b = r(b);
  3087.             else if (b = a.localeData().monthsParse(b), "number" != typeof b) return a;
  3088.         return c = Math.min(a.date(), ba(a.year(), b)), a._d["set" + (a._isUTC ? "UTC" : "") + "Month"](b, c), a
  3089.     }
  3090.  
  3091.     function ga(b) {
  3092.         return null != b ? (fa(this, b), a.updateOffset(this, !0), this) : N(this, "Month")
  3093.     }
  3094.  
  3095.     function ha() {
  3096.         return ba(this.year(), this.month())
  3097.     }
  3098.  
  3099.     function ia(a) {
  3100.         return this._monthsParseExact ? (f(this, "_monthsRegex") || ka.call(this), a ? this._monthsShortStrictRegex : this._monthsShortRegex) : this._monthsShortStrictRegex && a ? this._monthsShortStrictRegex : this._monthsShortRegex
  3101.     }
  3102.  
  3103.     function ja(a) {
  3104.         return this._monthsParseExact ? (f(this, "_monthsRegex") || ka.call(this), a ? this._monthsStrictRegex : this._monthsRegex) : this._monthsStrictRegex && a ? this._monthsStrictRegex : this._monthsRegex
  3105.     }
  3106.  
  3107.     function ka() {
  3108.         function a(a, b) {
  3109.             return b.length - a.length
  3110.         }
  3111.         var b, c, d = [],
  3112.             e = [],
  3113.             f = [];
  3114.         for (b = 0; 12 > b; b++) c = h([2e3, b]), d.push(this.monthsShort(c, "")), e.push(this.months(c, "")), f.push(this.months(c, "")), f.push(this.monthsShort(c, ""));
  3115.         for (d.sort(a), e.sort(a), f.sort(a), b = 0; 12 > b; b++) d[b] = Z(d[b]), e[b] = Z(e[b]), f[b] = Z(f[b]);
  3116.         this._monthsRegex = new RegExp("^(" + f.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp("^(" + e.join("|") + ")$", "i"), this._monthsShortStrictRegex = new RegExp("^(" + d.join("|") + ")$", "i")
  3117.     }
  3118.  
  3119.     function la(a) {
  3120.         var b, c = a._a;
  3121.         return c && -2 === j(a).overflow && (b = c[Cd] < 0 || c[Cd] > 11 ? Cd : c[Dd] < 1 || c[Dd] > ba(c[Bd], c[Cd]) ? Dd : c[Ed] < 0 || c[Ed] > 24 || 24 === c[Ed] && (0 !== c[Fd] || 0 !== c[Gd] || 0 !== c[Hd]) ? Ed : c[Fd] < 0 || c[Fd] > 59 ? Fd : c[Gd] < 0 || c[Gd] > 59 ? Gd : c[Hd] < 0 || c[Hd] > 999 ? Hd : -1, j(a)._overflowDayOfYear && (Bd > b || b > Dd) && (b = Dd), j(a)._overflowWeeks && -1 === b && (b = Id), j(a)._overflowWeekday && -1 === b && (b = Jd), j(a).overflow = b), a
  3122.     }
  3123.  
  3124.     function ma(a) {
  3125.         var b, c, d, e, f, g, h = a._i,
  3126.             i = Pd.exec(h) || Qd.exec(h);
  3127.         if (i) {
  3128.             for (j(a).iso = !0, b = 0, c = Sd.length; c > b; b++)
  3129.                 if (Sd[b][1].exec(i[1])) {
  3130.                     e = Sd[b][0], d = Sd[b][2] !== !1;
  3131.                     break
  3132.                 }
  3133.             if (null == e) return void(a._isValid = !1);
  3134.             if (i[3]) {
  3135.                 for (b = 0, c = Td.length; c > b; b++)
  3136.                     if (Td[b][1].exec(i[3])) {
  3137.                         f = (i[2] || " ") + Td[b][0];
  3138.                         break
  3139.                     }
  3140.                 if (null == f) return void(a._isValid = !1)
  3141.             }
  3142.             if (!d && null != f) return void(a._isValid = !1);
  3143.             if (i[4]) {
  3144.                 if (!Rd.exec(i[4])) return void(a._isValid = !1);
  3145.                 g = "Z"
  3146.             }
  3147.             a._f = e + (f || "") + (g || ""), Ba(a)
  3148.         } else a._isValid = !1
  3149.     }
  3150.  
  3151.     function na(b) {
  3152.         var c = Ud.exec(b._i);
  3153.         return null !== c ? void(b._d = new Date(+c[1])) : (ma(b), void(b._isValid === !1 && (delete b._isValid, a.createFromInputFallback(b))))
  3154.     }
  3155.  
  3156.     function oa(a, b, c, d, e, f, g) {
  3157.         var h = new Date(a, b, c, d, e, f, g);
  3158.         return 100 > a && a >= 0 && isFinite(h.getFullYear()) && h.setFullYear(a), h
  3159.     }
  3160.  
  3161.     function pa(a) {
  3162.         var b = new Date(Date.UTC.apply(null, arguments));
  3163.         return 100 > a && a >= 0 && isFinite(b.getUTCFullYear()) && b.setUTCFullYear(a), b
  3164.     }
  3165.  
  3166.     function qa(a) {
  3167.         return ra(a) ? 366 : 365
  3168.     }
  3169.  
  3170.     function ra(a) {
  3171.         return a % 4 === 0 && a % 100 !== 0 || a % 400 === 0
  3172.     }
  3173.  
  3174.     function sa() {
  3175.         return ra(this.year())
  3176.     }
  3177.  
  3178.     function ta(a, b, c) {
  3179.         var d = 7 + b - c,
  3180.             e = (7 + pa(a, 0, d).getUTCDay() - b) % 7;
  3181.         return -e + d - 1
  3182.     }
  3183.  
  3184.     function ua(a, b, c, d, e) {
  3185.         var f, g, h = (7 + c - d) % 7,
  3186.             i = ta(a, d, e),
  3187.             j = 1 + 7 * (b - 1) + h + i;
  3188.         return 0 >= j ? (f = a - 1, g = qa(f) + j) : j > qa(a) ? (f = a + 1, g = j - qa(a)) : (f = a, g = j), {
  3189.             year: f,
  3190.             dayOfYear: g
  3191.         }
  3192.     }
  3193.  
  3194.     function va(a, b, c) {
  3195.         var d, e, f = ta(a.year(), b, c),
  3196.             g = Math.floor((a.dayOfYear() - f - 1) / 7) + 1;
  3197.         return 1 > g ? (e = a.year() - 1, d = g + wa(e, b, c)) : g > wa(a.year(), b, c) ? (d = g - wa(a.year(), b, c), e = a.year() + 1) : (e = a.year(), d = g), {
  3198.             week: d,
  3199.             year: e
  3200.         }
  3201.     }
  3202.  
  3203.     function wa(a, b, c) {
  3204.         var d = ta(a, b, c),
  3205.             e = ta(a + 1, b, c);
  3206.         return (qa(a) - d + e) / 7
  3207.     }
  3208.  
  3209.     function xa(a, b, c) {
  3210.         return null != a ? a : null != b ? b : c
  3211.     }
  3212.  
  3213.     function ya(b) {
  3214.         var c = new Date(a.now());
  3215.         return b._useUTC ? [c.getUTCFullYear(), c.getUTCMonth(), c.getUTCDate()] : [c.getFullYear(), c.getMonth(), c.getDate()]
  3216.     }
  3217.  
  3218.     function za(a) {
  3219.         var b, c, d, e, f = [];
  3220.         if (!a._d) {
  3221.             for (d = ya(a), a._w && null == a._a[Dd] && null == a._a[Cd] && Aa(a), a._dayOfYear && (e = xa(a._a[Bd], d[Bd]), a._dayOfYear > qa(e) && (j(a)._overflowDayOfYear = !0), c = pa(e, 0, a._dayOfYear), a._a[Cd] = c.getUTCMonth(), a._a[Dd] = c.getUTCDate()), b = 0; 3 > b && null == a._a[b]; ++b) a._a[b] = f[b] = d[b];
  3222.             for (; 7 > b; b++) a._a[b] = f[b] = null == a._a[b] ? 2 === b ? 1 : 0 : a._a[b];
  3223.             24 === a._a[Ed] && 0 === a._a[Fd] && 0 === a._a[Gd] && 0 === a._a[Hd] && (a._nextDay = !0, a._a[Ed] = 0), a._d = (a._useUTC ? pa : oa).apply(null, f), null != a._tzm && a._d.setUTCMinutes(a._d.getUTCMinutes() - a._tzm), a._nextDay && (a._a[Ed] = 24)
  3224.         }
  3225.     }
  3226.  
  3227.     function Aa(a) {
  3228.         var b, c, d, e, f, g, h, i;
  3229.         b = a._w, null != b.GG || null != b.W || null != b.E ? (f = 1, g = 4, c = xa(b.GG, a._a[Bd], va(Ja(), 1, 4).year), d = xa(b.W, 1), e = xa(b.E, 1), (1 > e || e > 7) && (i = !0)) : (f = a._locale._week.dow, g = a._locale._week.doy, c = xa(b.gg, a._a[Bd], va(Ja(), f, g).year), d = xa(b.w, 1), null != b.d ? (e = b.d, (0 > e || e > 6) && (i = !0)) : null != b.e ? (e = b.e + f, (b.e < 0 || b.e > 6) && (i = !0)) : e = f), 1 > d || d > wa(c, f, g) ? j(a)._overflowWeeks = !0 : null != i ? j(a)._overflowWeekday = !0 : (h = ua(c, d, e, f, g), a._a[Bd] = h.year, a._dayOfYear = h.dayOfYear)
  3230.     }
  3231.  
  3232.     function Ba(b) {
  3233.         if (b._f === a.ISO_8601) return void ma(b);
  3234.         b._a = [], j(b).empty = !0;
  3235.         var c, d, e, f, g, h = "" + b._i,
  3236.             i = h.length,
  3237.             k = 0;
  3238.         for (e = V(b._f, b._locale).match(ed) || [], c = 0; c < e.length; c++) f = e[c], d = (h.match(X(f, b)) || [])[0], d && (g = h.substr(0, h.indexOf(d)), g.length > 0 && j(b).unusedInput.push(g), h = h.slice(h.indexOf(d) + d.length), k += d.length), hd[f] ? (d ? j(b).empty = !1 : j(b).unusedTokens.push(f), aa(f, d, b)) : b._strict && !d && j(b).unusedTokens.push(f);
  3239.         j(b).charsLeftOver = i - k, h.length > 0 && j(b).unusedInput.push(h), j(b).bigHour === !0 && b._a[Ed] <= 12 && b._a[Ed] > 0 && (j(b).bigHour = void 0), b._a[Ed] = Ca(b._locale, b._a[Ed], b._meridiem), za(b), la(b)
  3240.     }
  3241.  
  3242.     function Ca(a, b, c) {
  3243.         var d;
  3244.         return null == c ? b : null != a.meridiemHour ? a.meridiemHour(b, c) : null != a.isPM ? (d = a.isPM(c), d && 12 > b && (b += 12), d || 12 !== b || (b = 0), b) : b
  3245.     }
  3246.  
  3247.     function Da(a) {
  3248.         var b, c, d, e, f;
  3249.         if (0 === a._f.length) return j(a).invalidFormat = !0, void(a._d = new Date(NaN));
  3250.         for (e = 0; e < a._f.length; e++) f = 0, b = n({}, a), null != a._useUTC && (b._useUTC = a._useUTC), b._f = a._f[e], Ba(b), k(b) && (f += j(b).charsLeftOver, f += 10 * j(b).unusedTokens.length, j(b).score = f, (null == d || d > f) && (d = f, c = b));
  3251.         g(a, c || b)
  3252.     }
  3253.  
  3254.     function Ea(a) {
  3255.         if (!a._d) {
  3256.             var b = L(a._i);
  3257.             a._a = e([b.year, b.month, b.day || b.date, b.hour, b.minute, b.second, b.millisecond], function(a) {
  3258.                 return a && parseInt(a, 10)
  3259.             }), za(a)
  3260.         }
  3261.     }
  3262.  
  3263.     function Fa(a) {
  3264.         var b = new o(la(Ga(a)));
  3265.         return b._nextDay && (b.add(1, "d"), b._nextDay = void 0), b
  3266.     }
  3267.  
  3268.     function Ga(a) {
  3269.         var b = a._i,
  3270.             e = a._f;
  3271.         return a._locale = a._locale || H(a._l), null === b || void 0 === e && "" === b ? l({
  3272.             nullInput: !0
  3273.         }) : ("string" == typeof b && (a._i = b = a._locale.preparse(b)), p(b) ? new o(la(b)) : (c(e) ? Da(a) : e ? Ba(a) : d(b) ? a._d = b : Ha(a), k(a) || (a._d = null), a))
  3274.     }
  3275.  
  3276.     function Ha(b) {
  3277.         var f = b._i;
  3278.         void 0 === f ? b._d = new Date(a.now()) : d(f) ? b._d = new Date(+f) : "string" == typeof f ? na(b) : c(f) ? (b._a = e(f.slice(0), function(a) {
  3279.             return parseInt(a, 10)
  3280.         }), za(b)) : "object" == typeof f ? Ea(b) : "number" == typeof f ? b._d = new Date(f) : a.createFromInputFallback(b)
  3281.     }
  3282.  
  3283.     function Ia(a, b, c, d, e) {
  3284.         var f = {};
  3285.         return "boolean" == typeof c && (d = c, c = void 0), f._isAMomentObject = !0, f._useUTC = f._isUTC = e, f._l = c, f._i = a, f._f = b, f._strict = d, Fa(f)
  3286.     }
  3287.  
  3288.     function Ja(a, b, c, d) {
  3289.         return Ia(a, b, c, d, !1)
  3290.     }
  3291.  
  3292.     function Ka(a, b) {
  3293.         var d, e;
  3294.         if (1 === b.length && c(b[0]) && (b = b[0]), !b.length) return Ja();
  3295.         for (d = b[0], e = 1; e < b.length; ++e) b[e].isValid() && !b[e][a](d) || (d = b[e]);
  3296.         return d
  3297.     }
  3298.  
  3299.     function La() {
  3300.         var a = [].slice.call(arguments, 0);
  3301.         return Ka("isBefore", a)
  3302.     }
  3303.  
  3304.     function Ma() {
  3305.         var a = [].slice.call(arguments, 0);
  3306.         return Ka("isAfter", a)
  3307.     }
  3308.  
  3309.     function Na(a) {
  3310.         var b = L(a),
  3311.             c = b.year || 0,
  3312.             d = b.quarter || 0,
  3313.             e = b.month || 0,
  3314.             f = b.week || 0,
  3315.             g = b.day || 0,
  3316.             h = b.hour || 0,
  3317.             i = b.minute || 0,
  3318.             j = b.second || 0,
  3319.             k = b.millisecond || 0;
  3320.         this._milliseconds = +k + 1e3 * j + 6e4 * i + 36e5 * h, this._days = +g + 7 * f, this._months = +e + 3 * d + 12 * c, this._data = {}, this._locale = H(), this._bubble()
  3321.     }
  3322.  
  3323.     function Oa(a) {
  3324.         return a instanceof Na
  3325.     }
  3326.  
  3327.     function Pa(a, b) {
  3328.         R(a, 0, 0, function() {
  3329.             var a = this.utcOffset(),
  3330.                 c = "+";
  3331.             return 0 > a && (a = -a, c = "-"), c + Q(~~(a / 60), 2) + b + Q(~~a % 60, 2)
  3332.         })
  3333.     }
  3334.  
  3335.     function Qa(a, b) {
  3336.         var c = (b || "").match(a) || [],
  3337.             d = c[c.length - 1] || [],
  3338.             e = (d + "").match(Zd) || ["-", 0, 0],
  3339.             f = +(60 * e[1]) + r(e[2]);
  3340.         return "+" === e[0] ? f : -f
  3341.     }
  3342.  
  3343.     function Ra(b, c) {
  3344.         var e, f;
  3345.         return c._isUTC ? (e = c.clone(), f = (p(b) || d(b) ? +b : +Ja(b)) - +e, e._d.setTime(+e._d + f), a.updateOffset(e, !1), e) : Ja(b).local()
  3346.     }
  3347.  
  3348.     function Sa(a) {
  3349.         return 15 * -Math.round(a._d.getTimezoneOffset() / 15)
  3350.     }
  3351.  
  3352.     function Ta(b, c) {
  3353.         var d, e = this._offset || 0;
  3354.         return this.isValid() ? null != b ? ("string" == typeof b ? b = Qa(wd, b) : Math.abs(b) < 16 && (b = 60 * b), !this._isUTC && c && (d = Sa(this)), this._offset = b, this._isUTC = !0, null != d && this.add(d, "m"), e !== b && (!c || this._changeInProgress ? ib(this, cb(b - e, "m"), 1, !1) : this._changeInProgress || (this._changeInProgress = !0, a.updateOffset(this, !0), this._changeInProgress = null)), this) : this._isUTC ? e : Sa(this) : null != b ? this : NaN
  3355.     }
  3356.  
  3357.     function Ua(a, b) {
  3358.         return null != a ? ("string" != typeof a && (a = -a), this.utcOffset(a, b), this) : -this.utcOffset()
  3359.     }
  3360.  
  3361.     function Va(a) {
  3362.         return this.utcOffset(0, a)
  3363.     }
  3364.  
  3365.     function Wa(a) {
  3366.         return this._isUTC && (this.utcOffset(0, a), this._isUTC = !1, a && this.subtract(Sa(this), "m")), this
  3367.     }
  3368.  
  3369.     function Xa() {
  3370.         return this._tzm ? this.utcOffset(this._tzm) : "string" == typeof this._i && this.utcOffset(Qa(vd, this._i)), this
  3371.     }
  3372.  
  3373.     function Ya(a) {
  3374.         return this.isValid() ? (a = a ? Ja(a).utcOffset() : 0, (this.utcOffset() - a) % 60 === 0) : !1
  3375.     }
  3376.  
  3377.     function Za() {
  3378.         return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset()
  3379.     }
  3380.  
  3381.     function $a() {
  3382.         if (!m(this._isDSTShifted)) return this._isDSTShifted;
  3383.         var a = {};
  3384.         if (n(a, this), a = Ga(a), a._a) {
  3385.             var b = a._isUTC ? h(a._a) : Ja(a._a);
  3386.             this._isDSTShifted = this.isValid() && s(a._a, b.toArray()) > 0
  3387.         } else this._isDSTShifted = !1;
  3388.         return this._isDSTShifted
  3389.     }
  3390.  
  3391.     function _a() {
  3392.         return this.isValid() ? !this._isUTC : !1
  3393.     }
  3394.  
  3395.     function ab() {
  3396.         return this.isValid() ? this._isUTC : !1
  3397.     }
  3398.  
  3399.     function bb() {
  3400.         return this.isValid() ? this._isUTC && 0 === this._offset : !1;
  3401.     }
  3402.  
  3403.     function cb(a, b) {
  3404.         var c, d, e, g = a,
  3405.             h = null;
  3406.         return Oa(a) ? g = {
  3407.             ms: a._milliseconds,
  3408.             d: a._days,
  3409.             M: a._months
  3410.         } : "number" == typeof a ? (g = {}, b ? g[b] = a : g.milliseconds = a) : (h = $d.exec(a)) ? (c = "-" === h[1] ? -1 : 1, g = {
  3411.             y: 0,
  3412.             d: r(h[Dd]) * c,
  3413.             h: r(h[Ed]) * c,
  3414.             m: r(h[Fd]) * c,
  3415.             s: r(h[Gd]) * c,
  3416.             ms: r(h[Hd]) * c
  3417.         }) : (h = _d.exec(a)) ? (c = "-" === h[1] ? -1 : 1, g = {
  3418.             y: db(h[2], c),
  3419.             M: db(h[3], c),
  3420.             w: db(h[4], c),
  3421.             d: db(h[5], c),
  3422.             h: db(h[6], c),
  3423.             m: db(h[7], c),
  3424.             s: db(h[8], c)
  3425.         }) : null == g ? g = {} : "object" == typeof g && ("from" in g || "to" in g) && (e = fb(Ja(g.from), Ja(g.to)), g = {}, g.ms = e.milliseconds, g.M = e.months), d = new Na(g), Oa(a) && f(a, "_locale") && (d._locale = a._locale), d
  3426.     }
  3427.  
  3428.     function db(a, b) {
  3429.         var c = a && parseFloat(a.replace(",", "."));
  3430.         return (isNaN(c) ? 0 : c) * b
  3431.     }
  3432.  
  3433.     function eb(a, b) {
  3434.         var c = {
  3435.             milliseconds: 0,
  3436.             months: 0
  3437.         };
  3438.         return c.months = b.month() - a.month() + 12 * (b.year() - a.year()), a.clone().add(c.months, "M").isAfter(b) && --c.months, c.milliseconds = +b - +a.clone().add(c.months, "M"), c
  3439.     }
  3440.  
  3441.     function fb(a, b) {
  3442.         var c;
  3443.         return a.isValid() && b.isValid() ? (b = Ra(b, a), a.isBefore(b) ? c = eb(a, b) : (c = eb(b, a), c.milliseconds = -c.milliseconds, c.months = -c.months), c) : {
  3444.             milliseconds: 0,
  3445.             months: 0
  3446.         }
  3447.     }
  3448.  
  3449.     function gb(a) {
  3450.         return 0 > a ? -1 * Math.round(-1 * a) : Math.round(a)
  3451.     }
  3452.  
  3453.     function hb(a, b) {
  3454.         return function(c, d) {
  3455.             var e, f;
  3456.             return null === d || isNaN(+d) || (v(b, "moment()." + b + "(period, number) is deprecated. Please use moment()." + b + "(number, period)."), f = c, c = d, d = f), c = "string" == typeof c ? +c : c, e = cb(c, d), ib(this, e, a), this
  3457.         }
  3458.     }
  3459.  
  3460.     function ib(b, c, d, e) {
  3461.         var f = c._milliseconds,
  3462.             g = gb(c._days),
  3463.             h = gb(c._months);
  3464.         b.isValid() && (e = null == e ? !0 : e, f && b._d.setTime(+b._d + f * d), g && O(b, "Date", N(b, "Date") + g * d), h && fa(b, N(b, "Month") + h * d), e && a.updateOffset(b, g || h))
  3465.     }
  3466.  
  3467.     function jb(a, b) {
  3468.         var c = a || Ja(),
  3469.             d = Ra(c, this).startOf("day"),
  3470.             e = this.diff(d, "days", !0),
  3471.             f = -6 > e ? "sameElse" : -1 > e ? "lastWeek" : 0 > e ? "lastDay" : 1 > e ? "sameDay" : 2 > e ? "nextDay" : 7 > e ? "nextWeek" : "sameElse",
  3472.             g = b && (w(b[f]) ? b[f]() : b[f]);
  3473.         return this.format(g || this.localeData().calendar(f, this, Ja(c)))
  3474.     }
  3475.  
  3476.     function kb() {
  3477.         return new o(this)
  3478.     }
  3479.  
  3480.     function lb(a, b) {
  3481.         var c = p(a) ? a : Ja(a);
  3482.         return this.isValid() && c.isValid() ? (b = K(m(b) ? "millisecond" : b), "millisecond" === b ? +this > +c : +c < +this.clone().startOf(b)) : !1
  3483.     }
  3484.  
  3485.     function mb(a, b) {
  3486.         var c = p(a) ? a : Ja(a);
  3487.         return this.isValid() && c.isValid() ? (b = K(m(b) ? "millisecond" : b), "millisecond" === b ? +c > +this : +this.clone().endOf(b) < +c) : !1
  3488.     }
  3489.  
  3490.     function nb(a, b, c) {
  3491.         return this.isAfter(a, c) && this.isBefore(b, c)
  3492.     }
  3493.  
  3494.     function ob(a, b) {
  3495.         var c, d = p(a) ? a : Ja(a);
  3496.         return this.isValid() && d.isValid() ? (b = K(b || "millisecond"), "millisecond" === b ? +this === +d : (c = +d, +this.clone().startOf(b) <= c && c <= +this.clone().endOf(b))) : !1
  3497.     }
  3498.  
  3499.     function pb(a, b) {
  3500.         return this.isSame(a, b) || this.isAfter(a, b)
  3501.     }
  3502.  
  3503.     function qb(a, b) {
  3504.         return this.isSame(a, b) || this.isBefore(a, b)
  3505.     }
  3506.  
  3507.     function rb(a, b, c) {
  3508.         var d, e, f, g;
  3509.         return this.isValid() ? (d = Ra(a, this), d.isValid() ? (e = 6e4 * (d.utcOffset() - this.utcOffset()), b = K(b), "year" === b || "month" === b || "quarter" === b ? (g = sb(this, d), "quarter" === b ? g /= 3 : "year" === b && (g /= 12)) : (f = this - d, g = "second" === b ? f / 1e3 : "minute" === b ? f / 6e4 : "hour" === b ? f / 36e5 : "day" === b ? (f - e) / 864e5 : "week" === b ? (f - e) / 6048e5 : f), c ? g : q(g)) : NaN) : NaN
  3510.     }
  3511.  
  3512.     function sb(a, b) {
  3513.         var c, d, e = 12 * (b.year() - a.year()) + (b.month() - a.month()),
  3514.             f = a.clone().add(e, "months");
  3515.         return 0 > b - f ? (c = a.clone().add(e - 1, "months"), d = (b - f) / (f - c)) : (c = a.clone().add(e + 1, "months"), d = (b - f) / (c - f)), -(e + d)
  3516.     }
  3517.  
  3518.     function tb() {
  3519.         return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")
  3520.     }
  3521.  
  3522.     function ub() {
  3523.         var a = this.clone().utc();
  3524.         return 0 < a.year() && a.year() <= 9999 ? w(Date.prototype.toISOString) ? this.toDate().toISOString() : U(a, "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]") : U(a, "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")
  3525.     }
  3526.  
  3527.     function vb(b) {
  3528.         var c = U(this, b || a.defaultFormat);
  3529.         return this.localeData().postformat(c)
  3530.     }
  3531.  
  3532.     function wb(a, b) {
  3533.         return this.isValid() && (p(a) && a.isValid() || Ja(a).isValid()) ? cb({
  3534.             to: this,
  3535.             from: a
  3536.         }).locale(this.locale()).humanize(!b) : this.localeData().invalidDate()
  3537.     }
  3538.  
  3539.     function xb(a) {
  3540.         return this.from(Ja(), a)
  3541.     }
  3542.  
  3543.     function yb(a, b) {
  3544.         return this.isValid() && (p(a) && a.isValid() || Ja(a).isValid()) ? cb({
  3545.             from: this,
  3546.             to: a
  3547.         }).locale(this.locale()).humanize(!b) : this.localeData().invalidDate()
  3548.     }
  3549.  
  3550.     function zb(a) {
  3551.         return this.to(Ja(), a)
  3552.     }
  3553.  
  3554.     function Ab(a) {
  3555.         var b;
  3556.         return void 0 === a ? this._locale._abbr : (b = H(a), null != b && (this._locale = b), this)
  3557.     }
  3558.  
  3559.     function Bb() {
  3560.         return this._locale
  3561.     }
  3562.  
  3563.     function Cb(a) {
  3564.         switch (a = K(a)) {
  3565.             case "year":
  3566.                 this.month(0);
  3567.             case "quarter":
  3568.             case "month":
  3569.                 this.date(1);
  3570.             case "week":
  3571.             case "isoWeek":
  3572.             case "day":
  3573.                 this.hours(0);
  3574.             case "hour":
  3575.                 this.minutes(0);
  3576.             case "minute":
  3577.                 this.seconds(0);
  3578.             case "second":
  3579.                 this.milliseconds(0)
  3580.         }
  3581.         return "week" === a && this.weekday(0), "isoWeek" === a && this.isoWeekday(1), "quarter" === a && this.month(3 * Math.floor(this.month() / 3)), this
  3582.     }
  3583.  
  3584.     function Db(a) {
  3585.         return a = K(a), void 0 === a || "millisecond" === a ? this : this.startOf(a).add(1, "isoWeek" === a ? "week" : a).subtract(1, "ms")
  3586.     }
  3587.  
  3588.     function Eb() {
  3589.         return +this._d - 6e4 * (this._offset || 0)
  3590.     }
  3591.  
  3592.     function Fb() {
  3593.         return Math.floor(+this / 1e3)
  3594.     }
  3595.  
  3596.     function Gb() {
  3597.         return this._offset ? new Date(+this) : this._d
  3598.     }
  3599.  
  3600.     function Hb() {
  3601.         var a = this;
  3602.         return [a.year(), a.month(), a.date(), a.hour(), a.minute(), a.second(), a.millisecond()]
  3603.     }
  3604.  
  3605.     function Ib() {
  3606.         var a = this;
  3607.         return {
  3608.             years: a.year(),
  3609.             months: a.month(),
  3610.             date: a.date(),
  3611.             hours: a.hours(),
  3612.             minutes: a.minutes(),
  3613.             seconds: a.seconds(),
  3614.             milliseconds: a.milliseconds()
  3615.         }
  3616.     }
  3617.  
  3618.     function Jb() {
  3619.         return this.isValid() ? this.toISOString() : null
  3620.     }
  3621.  
  3622.     function Kb() {
  3623.         return k(this)
  3624.     }
  3625.  
  3626.     function Lb() {
  3627.         return g({}, j(this))
  3628.     }
  3629.  
  3630.     function Mb() {
  3631.         return j(this).overflow
  3632.     }
  3633.  
  3634.     function Nb() {
  3635.         return {
  3636.             input: this._i,
  3637.             format: this._f,
  3638.             locale: this._locale,
  3639.             isUTC: this._isUTC,
  3640.             strict: this._strict
  3641.         }
  3642.     }
  3643.  
  3644.     function Ob(a, b) {
  3645.         R(0, [a, a.length], 0, b)
  3646.     }
  3647.  
  3648.     function Pb(a) {
  3649.         return Tb.call(this, a, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy)
  3650.     }
  3651.  
  3652.     function Qb(a) {
  3653.         return Tb.call(this, a, this.isoWeek(), this.isoWeekday(), 1, 4)
  3654.     }
  3655.  
  3656.     function Rb() {
  3657.         return wa(this.year(), 1, 4)
  3658.     }
  3659.  
  3660.     function Sb() {
  3661.         var a = this.localeData()._week;
  3662.         return wa(this.year(), a.dow, a.doy)
  3663.     }
  3664.  
  3665.     function Tb(a, b, c, d, e) {
  3666.         var f;
  3667.         return null == a ? va(this, d, e).year : (f = wa(a, d, e), b > f && (b = f), Ub.call(this, a, b, c, d, e))
  3668.     }
  3669.  
  3670.     function Ub(a, b, c, d, e) {
  3671.         var f = ua(a, b, c, d, e),
  3672.             g = pa(f.year, 0, f.dayOfYear);
  3673.         return this.year(g.getUTCFullYear()), this.month(g.getUTCMonth()), this.date(g.getUTCDate()), this
  3674.     }
  3675.  
  3676.     function Vb(a) {
  3677.         return null == a ? Math.ceil((this.month() + 1) / 3) : this.month(3 * (a - 1) + this.month() % 3)
  3678.     }
  3679.  
  3680.     function Wb(a) {
  3681.         return va(a, this._week.dow, this._week.doy).week
  3682.     }
  3683.  
  3684.     function Xb() {
  3685.         return this._week.dow
  3686.     }
  3687.  
  3688.     function Yb() {
  3689.         return this._week.doy
  3690.     }
  3691.  
  3692.     function Zb(a) {
  3693.         var b = this.localeData().week(this);
  3694.         return null == a ? b : this.add(7 * (a - b), "d")
  3695.     }
  3696.  
  3697.     function $b(a) {
  3698.         var b = va(this, 1, 4).week;
  3699.         return null == a ? b : this.add(7 * (a - b), "d")
  3700.     }
  3701.  
  3702.     function _b(a, b) {
  3703.         return "string" != typeof a ? a : isNaN(a) ? (a = b.weekdaysParse(a), "number" == typeof a ? a : null) : parseInt(a, 10)
  3704.     }
  3705.  
  3706.     function ac(a, b) {
  3707.         return c(this._weekdays) ? this._weekdays[a.day()] : this._weekdays[this._weekdays.isFormat.test(b) ? "format" : "standalone"][a.day()]
  3708.     }
  3709.  
  3710.     function bc(a) {
  3711.         return this._weekdaysShort[a.day()]
  3712.     }
  3713.  
  3714.     function cc(a) {
  3715.         return this._weekdaysMin[a.day()]
  3716.     }
  3717.  
  3718.     function dc(a, b, c) {
  3719.         var d, e, f;
  3720.         for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), d = 0; 7 > d; d++) {
  3721.             if (e = Ja([2e3, 1]).day(d), c && !this._fullWeekdaysParse[d] && (this._fullWeekdaysParse[d] = new RegExp("^" + this.weekdays(e, "").replace(".", ".?") + "$", "i"), this._shortWeekdaysParse[d] = new RegExp("^" + this.weekdaysShort(e, "").replace(".", ".?") + "$", "i"), this._minWeekdaysParse[d] = new RegExp("^" + this.weekdaysMin(e, "").replace(".", ".?") + "$", "i")), this._weekdaysParse[d] || (f = "^" + this.weekdays(e, "") + "|^" + this.weekdaysShort(e, "") + "|^" + this.weekdaysMin(e, ""), this._weekdaysParse[d] = new RegExp(f.replace(".", ""), "i")), c && "dddd" === b && this._fullWeekdaysParse[d].test(a)) return d;
  3722.             if (c && "ddd" === b && this._shortWeekdaysParse[d].test(a)) return d;
  3723.             if (c && "dd" === b && this._minWeekdaysParse[d].test(a)) return d;
  3724.             if (!c && this._weekdaysParse[d].test(a)) return d
  3725.         }
  3726.     }
  3727.  
  3728.     function ec(a) {
  3729.         if (!this.isValid()) return null != a ? this : NaN;
  3730.         var b = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
  3731.         return null != a ? (a = _b(a, this.localeData()), this.add(a - b, "d")) : b
  3732.     }
  3733.  
  3734.     function fc(a) {
  3735.         if (!this.isValid()) return null != a ? this : NaN;
  3736.         var b = (this.day() + 7 - this.localeData()._week.dow) % 7;
  3737.         return null == a ? b : this.add(a - b, "d")
  3738.     }
  3739.  
  3740.     function gc(a) {
  3741.         return this.isValid() ? null == a ? this.day() || 7 : this.day(this.day() % 7 ? a : a - 7) : null != a ? this : NaN
  3742.     }
  3743.  
  3744.     function hc(a) {
  3745.         var b = Math.round((this.clone().startOf("day") - this.clone().startOf("year")) / 864e5) + 1;
  3746.         return null == a ? b : this.add(a - b, "d")
  3747.     }
  3748.  
  3749.     function ic() {
  3750.         return this.hours() % 12 || 12
  3751.     }
  3752.  
  3753.     function jc(a, b) {
  3754.         R(a, 0, 0, function() {
  3755.             return this.localeData().meridiem(this.hours(), this.minutes(), b)
  3756.         })
  3757.     }
  3758.  
  3759.     function kc(a, b) {
  3760.         return b._meridiemParse
  3761.     }
  3762.  
  3763.     function lc(a) {
  3764.         return "p" === (a + "").toLowerCase().charAt(0)
  3765.     }
  3766.  
  3767.     function mc(a, b, c) {
  3768.         return a > 11 ? c ? "pm" : "PM" : c ? "am" : "AM"
  3769.     }
  3770.  
  3771.     function nc(a, b) {
  3772.         b[Hd] = r(1e3 * ("0." + a))
  3773.     }
  3774.  
  3775.     function oc() {
  3776.         return this._isUTC ? "UTC" : ""
  3777.     }
  3778.  
  3779.     function pc() {
  3780.         return this._isUTC ? "Coordinated Universal Time" : ""
  3781.     }
  3782.  
  3783.     function qc(a) {
  3784.         return Ja(1e3 * a)
  3785.     }
  3786.  
  3787.     function rc() {
  3788.         return Ja.apply(null, arguments).parseZone()
  3789.     }
  3790.  
  3791.     function sc(a, b, c) {
  3792.         var d = this._calendar[a];
  3793.         return w(d) ? d.call(b, c) : d
  3794.     }
  3795.  
  3796.     function tc(a) {
  3797.         var b = this._longDateFormat[a],
  3798.             c = this._longDateFormat[a.toUpperCase()];
  3799.         return b || !c ? b : (this._longDateFormat[a] = c.replace(/MMMM|MM|DD|dddd/g, function(a) {
  3800.             return a.slice(1)
  3801.         }), this._longDateFormat[a])
  3802.     }
  3803.  
  3804.     function uc() {
  3805.         return this._invalidDate
  3806.     }
  3807.  
  3808.     function vc(a) {
  3809.         return this._ordinal.replace("%d", a)
  3810.     }
  3811.  
  3812.     function wc(a) {
  3813.         return a
  3814.     }
  3815.  
  3816.     function xc(a, b, c, d) {
  3817.         var e = this._relativeTime[c];
  3818.         return w(e) ? e(a, b, c, d) : e.replace(/%d/i, a)
  3819.     }
  3820.  
  3821.     function yc(a, b) {
  3822.         var c = this._relativeTime[a > 0 ? "future" : "past"];
  3823.         return w(c) ? c(b) : c.replace(/%s/i, b)
  3824.     }
  3825.  
  3826.     function zc(a, b, c, d) {
  3827.         var e = H(),
  3828.             f = h().set(d, b);
  3829.         return e[c](f, a)
  3830.     }
  3831.  
  3832.     function Ac(a, b, c, d, e) {
  3833.         if ("number" == typeof a && (b = a, a = void 0), a = a || "", null != b) return zc(a, b, c, e);
  3834.         var f, g = [];
  3835.         for (f = 0; d > f; f++) g[f] = zc(a, f, c, e);
  3836.         return g
  3837.     }
  3838.  
  3839.     function Bc(a, b) {
  3840.         return Ac(a, b, "months", 12, "month")
  3841.     }
  3842.  
  3843.     function Cc(a, b) {
  3844.         return Ac(a, b, "monthsShort", 12, "month")
  3845.     }
  3846.  
  3847.     function Dc(a, b) {
  3848.         return Ac(a, b, "weekdays", 7, "day")
  3849.     }
  3850.  
  3851.     function Ec(a, b) {
  3852.         return Ac(a, b, "weekdaysShort", 7, "day")
  3853.     }
  3854.  
  3855.     function Fc(a, b) {
  3856.         return Ac(a, b, "weekdaysMin", 7, "day")
  3857.     }
  3858.  
  3859.     function Gc() {
  3860.         var a = this._data;
  3861.         return this._milliseconds = xe(this._milliseconds), this._days = xe(this._days), this._months = xe(this._months), a.milliseconds = xe(a.milliseconds), a.seconds = xe(a.seconds), a.minutes = xe(a.minutes), a.hours = xe(a.hours), a.months = xe(a.months), a.years = xe(a.years), this
  3862.     }
  3863.  
  3864.     function Hc(a, b, c, d) {
  3865.         var e = cb(b, c);
  3866.         return a._milliseconds += d * e._milliseconds, a._days += d * e._days, a._months += d * e._months, a._bubble()
  3867.     }
  3868.  
  3869.     function Ic(a, b) {
  3870.         return Hc(this, a, b, 1)
  3871.     }
  3872.  
  3873.     function Jc(a, b) {
  3874.         return Hc(this, a, b, -1)
  3875.     }
  3876.  
  3877.     function Kc(a) {
  3878.         return 0 > a ? Math.floor(a) : Math.ceil(a)
  3879.     }
  3880.  
  3881.     function Lc() {
  3882.         var a, b, c, d, e, f = this._milliseconds,
  3883.             g = this._days,
  3884.             h = this._months,
  3885.             i = this._data;
  3886.         return f >= 0 && g >= 0 && h >= 0 || 0 >= f && 0 >= g && 0 >= h || (f += 864e5 * Kc(Nc(h) + g), g = 0, h = 0), i.milliseconds = f % 1e3, a = q(f / 1e3), i.seconds = a % 60, b = q(a / 60), i.minutes = b % 60, c = q(b / 60), i.hours = c % 24, g += q(c / 24), e = q(Mc(g)), h += e, g -= Kc(Nc(e)), d = q(h / 12), h %= 12, i.days = g, i.months = h, i.years = d, this
  3887.     }
  3888.  
  3889.     function Mc(a) {
  3890.         return 4800 * a / 146097
  3891.     }
  3892.  
  3893.     function Nc(a) {
  3894.         return 146097 * a / 4800
  3895.     }
  3896.  
  3897.     function Oc(a) {
  3898.         var b, c, d = this._milliseconds;
  3899.         if (a = K(a), "month" === a || "year" === a) return b = this._days + d / 864e5, c = this._months + Mc(b), "month" === a ? c : c / 12;
  3900.         switch (b = this._days + Math.round(Nc(this._months)), a) {
  3901.             case "week":
  3902.                 return b / 7 + d / 6048e5;
  3903.             case "day":
  3904.                 return b + d / 864e5;
  3905.             case "hour":
  3906.                 return 24 * b + d / 36e5;
  3907.             case "minute":
  3908.                 return 1440 * b + d / 6e4;
  3909.             case "second":
  3910.                 return 86400 * b + d / 1e3;
  3911.             case "millisecond":
  3912.                 return Math.floor(864e5 * b) + d;
  3913.             default:
  3914.                 throw new Error("Unknown unit " + a)
  3915.         }
  3916.     }
  3917.  
  3918.     function Pc() {
  3919.         return this._milliseconds + 864e5 * this._days + this._months % 12 * 2592e6 + 31536e6 * r(this._months / 12)
  3920.     }
  3921.  
  3922.     function Qc(a) {
  3923.         return function() {
  3924.             return this.as(a)
  3925.         }
  3926.     }
  3927.  
  3928.     function Rc(a) {
  3929.         return a = K(a), this[a + "s"]()
  3930.     }
  3931.  
  3932.     function Sc(a) {
  3933.         return function() {
  3934.             return this._data[a]
  3935.         }
  3936.     }
  3937.  
  3938.     function Tc() {
  3939.         return q(this.days() / 7)
  3940.     }
  3941.  
  3942.     function Uc(a, b, c, d, e) {
  3943.         return e.relativeTime(b || 1, !!c, a, d)
  3944.     }
  3945.  
  3946.     function Vc(a, b, c) {
  3947.         var d = cb(a).abs(),
  3948.             e = Ne(d.as("s")),
  3949.             f = Ne(d.as("m")),
  3950.             g = Ne(d.as("h")),
  3951.             h = Ne(d.as("d")),
  3952.             i = Ne(d.as("M")),
  3953.             j = Ne(d.as("y")),
  3954.             k = e < Oe.s && ["s", e] || 1 >= f && ["m"] || f < Oe.m && ["mm", f] || 1 >= g && ["h"] || g < Oe.h && ["hh", g] || 1 >= h && ["d"] || h < Oe.d && ["dd", h] || 1 >= i && ["M"] || i < Oe.M && ["MM", i] || 1 >= j && ["y"] || ["yy", j];
  3955.         return k[2] = b, k[3] = +a > 0, k[4] = c, Uc.apply(null, k)
  3956.     }
  3957.  
  3958.     function Wc(a, b) {
  3959.         return void 0 === Oe[a] ? !1 : void 0 === b ? Oe[a] : (Oe[a] = b, !0)
  3960.     }
  3961.  
  3962.     function Xc(a) {
  3963.         var b = this.localeData(),
  3964.             c = Vc(this, !a, b);
  3965.         return a && (c = b.pastFuture(+this, c)), b.postformat(c)
  3966.     }
  3967.  
  3968.     function Yc() {
  3969.         var a, b, c, d = Pe(this._milliseconds) / 1e3,
  3970.             e = Pe(this._days),
  3971.             f = Pe(this._months);
  3972.         a = q(d / 60), b = q(a / 60), d %= 60, a %= 60, c = q(f / 12), f %= 12;
  3973.         var g = c,
  3974.             h = f,
  3975.             i = e,
  3976.             j = b,
  3977.             k = a,
  3978.             l = d,
  3979.             m = this.asSeconds();
  3980.         return m ? (0 > m ? "-" : "") + "P" + (g ? g + "Y" : "") + (h ? h + "M" : "") + (i ? i + "D" : "") + (j || k || l ? "T" : "") + (j ? j + "H" : "") + (k ? k + "M" : "") + (l ? l + "S" : "") : "P0D"
  3981.     }
  3982.     var Zc, $c = a.momentProperties = [],
  3983.         _c = !1,
  3984.         ad = {};
  3985.     a.suppressDeprecationWarnings = !1;
  3986.     var bd, cd = {},
  3987.         dd = {},
  3988.         ed = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
  3989.         fd = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
  3990.         gd = {},
  3991.         hd = {},
  3992.         id = /\d/,
  3993.         jd = /\d\d/,
  3994.         kd = /\d{3}/,
  3995.         ld = /\d{4}/,
  3996.         md = /[+-]?\d{6}/,
  3997.         nd = /\d\d?/,
  3998.         od = /\d\d\d\d?/,
  3999.         pd = /\d\d\d\d\d\d?/,
  4000.         qd = /\d{1,3}/,
  4001.         rd = /\d{1,4}/,
  4002.         sd = /[+-]?\d{1,6}/,
  4003.         td = /\d+/,
  4004.         ud = /[+-]?\d+/,
  4005.         vd = /Z|[+-]\d\d:?\d\d/gi,
  4006.         wd = /Z|[+-]\d\d(?::?\d\d)?/gi,
  4007.         xd = /[+-]?\d+(\.\d{1,3})?/,
  4008.         yd = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,
  4009.         zd = {},
  4010.         Ad = {},
  4011.         Bd = 0,
  4012.         Cd = 1,
  4013.         Dd = 2,
  4014.         Ed = 3,
  4015.         Fd = 4,
  4016.         Gd = 5,
  4017.         Hd = 6,
  4018.         Id = 7,
  4019.         Jd = 8;
  4020.     R("M", ["MM", 2], "Mo", function() {
  4021.         return this.month() + 1
  4022.     }), R("MMM", 0, 0, function(a) {
  4023.         return this.localeData().monthsShort(this, a)
  4024.     }), R("MMMM", 0, 0, function(a) {
  4025.         return this.localeData().months(this, a)
  4026.     }), J("month", "M"), W("M", nd), W("MM", nd, jd), W("MMM", function(a, b) {
  4027.         return b.monthsShortRegex(a)
  4028.     }), W("MMMM", function(a, b) {
  4029.         return b.monthsRegex(a)
  4030.     }), $(["M", "MM"], function(a, b) {
  4031.         b[Cd] = r(a) - 1
  4032.     }), $(["MMM", "MMMM"], function(a, b, c, d) {
  4033.         var e = c._locale.monthsParse(a, d, c._strict);
  4034.         null != e ? b[Cd] = e : j(c).invalidMonth = a
  4035.     });
  4036.     var Kd = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,
  4037.         Ld = "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
  4038.         Md = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),
  4039.         Nd = yd,
  4040.         Od = yd,
  4041.         Pd = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,
  4042.         Qd = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,
  4043.         Rd = /Z|[+-]\d\d(?::?\d\d)?/,
  4044.         Sd = [
  4045.             ["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/],
  4046.             ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/],
  4047.             ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/],
  4048.             ["GGGG-[W]WW", /\d{4}-W\d\d/, !1],
  4049.             ["YYYY-DDD", /\d{4}-\d{3}/],
  4050.             ["YYYY-MM", /\d{4}-\d\d/, !1],
  4051.             ["YYYYYYMMDD", /[+-]\d{10}/],
  4052.             ["YYYYMMDD", /\d{8}/],
  4053.             ["GGGG[W]WWE", /\d{4}W\d{3}/],
  4054.             ["GGGG[W]WW", /\d{4}W\d{2}/, !1],
  4055.             ["YYYYDDD", /\d{7}/]
  4056.         ],
  4057.         Td = [
  4058.             ["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/],
  4059.             ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/],
  4060.             ["HH:mm:ss", /\d\d:\d\d:\d\d/],
  4061.             ["HH:mm", /\d\d:\d\d/],
  4062.             ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/],
  4063.             ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/],
  4064.             ["HHmmss", /\d\d\d\d\d\d/],
  4065.             ["HHmm", /\d\d\d\d/],
  4066.             ["HH", /\d\d/]
  4067.         ],
  4068.         Ud = /^\/?Date\((\-?\d+)/i;
  4069.     a.createFromInputFallback = u("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.", function(a) {
  4070.         a._d = new Date(a._i + (a._useUTC ? " UTC" : ""))
  4071.     }), R("Y", 0, 0, function() {
  4072.         var a = this.year();
  4073.         return 9999 >= a ? "" + a : "+" + a
  4074.     }), R(0, ["YY", 2], 0, function() {
  4075.         return this.year() % 100
  4076.     }), R(0, ["YYYY", 4], 0, "year"), R(0, ["YYYYY", 5], 0, "year"), R(0, ["YYYYYY", 6, !0], 0, "year"), J("year", "y"), W("Y", ud), W("YY", nd, jd), W("YYYY", rd, ld), W("YYYYY", sd, md), W("YYYYYY", sd, md), $(["YYYYY", "YYYYYY"], Bd), $("YYYY", function(b, c) {
  4077.         c[Bd] = 2 === b.length ? a.parseTwoDigitYear(b) : r(b)
  4078.     }), $("YY", function(b, c) {
  4079.         c[Bd] = a.parseTwoDigitYear(b)
  4080.     }), $("Y", function(a, b) {
  4081.         b[Bd] = parseInt(a, 10)
  4082.     }), a.parseTwoDigitYear = function(a) {
  4083.         return r(a) + (r(a) > 68 ? 1900 : 2e3)
  4084.     };
  4085.     var Vd = M("FullYear", !1);
  4086.     a.ISO_8601 = function() {};
  4087.     var Wd = u("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548", function() {
  4088.             var a = Ja.apply(null, arguments);
  4089.             return this.isValid() && a.isValid() ? this > a ? this : a : l()
  4090.         }),
  4091.         Xd = u("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548", function() {
  4092.             var a = Ja.apply(null, arguments);
  4093.             return this.isValid() && a.isValid() ? a > this ? this : a : l()
  4094.         }),
  4095.         Yd = function() {
  4096.             return Date.now ? Date.now() : +new Date
  4097.         };
  4098.     Pa("Z", ":"), Pa("ZZ", ""), W("Z", wd), W("ZZ", wd), $(["Z", "ZZ"], function(a, b, c) {
  4099.         c._useUTC = !0, c._tzm = Qa(wd, a)
  4100.     });
  4101.     var Zd = /([\+\-]|\d\d)/gi;
  4102.     a.updateOffset = function() {};
  4103.     var $d = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,
  4104.         _d = /^(-)?P(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)W)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?$/;
  4105.     cb.fn = Na.prototype;
  4106.     var ae = hb(1, "add"),
  4107.         be = hb(-1, "subtract");
  4108.     a.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ";
  4109.     var ce = u("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.", function(a) {
  4110.         return void 0 === a ? this.localeData() : this.locale(a)
  4111.     });
  4112.     R(0, ["gg", 2], 0, function() {
  4113.         return this.weekYear() % 100
  4114.     }), R(0, ["GG", 2], 0, function() {
  4115.         return this.isoWeekYear() % 100
  4116.     }), Ob("gggg", "weekYear"), Ob("ggggg", "weekYear"), Ob("GGGG", "isoWeekYear"), Ob("GGGGG", "isoWeekYear"), J("weekYear", "gg"), J("isoWeekYear", "GG"), W("G", ud), W("g", ud), W("GG", nd, jd), W("gg", nd, jd), W("GGGG", rd, ld), W("gggg", rd, ld), W("GGGGG", sd, md), W("ggggg", sd, md), _(["gggg", "ggggg", "GGGG", "GGGGG"], function(a, b, c, d) {
  4117.         b[d.substr(0, 2)] = r(a)
  4118.     }), _(["gg", "GG"], function(b, c, d, e) {
  4119.         c[e] = a.parseTwoDigitYear(b)
  4120.     }), R("Q", 0, "Qo", "quarter"), J("quarter", "Q"), W("Q", id), $("Q", function(a, b) {
  4121.         b[Cd] = 3 * (r(a) - 1)
  4122.     }), R("w", ["ww", 2], "wo", "week"), R("W", ["WW", 2], "Wo", "isoWeek"), J("week", "w"), J("isoWeek", "W"), W("w", nd), W("ww", nd, jd), W("W", nd), W("WW", nd, jd), _(["w", "ww", "W", "WW"], function(a, b, c, d) {
  4123.         b[d.substr(0, 1)] = r(a)
  4124.     });
  4125.     var de = {
  4126.         dow: 0,
  4127.         doy: 6
  4128.     };
  4129.     R("D", ["DD", 2], "Do", "date"), J("date", "D"), W("D", nd), W("DD", nd, jd), W("Do", function(a, b) {
  4130.         return a ? b._ordinalParse : b._ordinalParseLenient
  4131.     }), $(["D", "DD"], Dd), $("Do", function(a, b) {
  4132.         b[Dd] = r(a.match(nd)[0], 10)
  4133.     });
  4134.     var ee = M("Date", !0);
  4135.     R("d", 0, "do", "day"), R("dd", 0, 0, function(a) {
  4136.         return this.localeData().weekdaysMin(this, a)
  4137.     }), R("ddd", 0, 0, function(a) {
  4138.         return this.localeData().weekdaysShort(this, a)
  4139.     }), R("dddd", 0, 0, function(a) {
  4140.         return this.localeData().weekdays(this, a)
  4141.     }), R("e", 0, 0, "weekday"), R("E", 0, 0, "isoWeekday"), J("day", "d"), J("weekday", "e"), J("isoWeekday", "E"), W("d", nd), W("e", nd), W("E", nd), W("dd", yd), W("ddd", yd), W("dddd", yd), _(["dd", "ddd", "dddd"], function(a, b, c, d) {
  4142.         var e = c._locale.weekdaysParse(a, d, c._strict);
  4143.         null != e ? b.d = e : j(c).invalidWeekday = a
  4144.     }), _(["d", "e", "E"], function(a, b, c, d) {
  4145.         b[d] = r(a)
  4146.     });
  4147.     var fe = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
  4148.         ge = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),
  4149.         he = "Su_Mo_Tu_We_Th_Fr_Sa".split("_");
  4150.     R("DDD", ["DDDD", 3], "DDDo", "dayOfYear"), J("dayOfYear", "DDD"), W("DDD", qd), W("DDDD", kd), $(["DDD", "DDDD"], function(a, b, c) {
  4151.         c._dayOfYear = r(a)
  4152.     }), R("H", ["HH", 2], 0, "hour"), R("h", ["hh", 2], 0, ic), R("hmm", 0, 0, function() {
  4153.         return "" + ic.apply(this) + Q(this.minutes(), 2)
  4154.     }), R("hmmss", 0, 0, function() {
  4155.         return "" + ic.apply(this) + Q(this.minutes(), 2) + Q(this.seconds(), 2)
  4156.     }), R("Hmm", 0, 0, function() {
  4157.         return "" + this.hours() + Q(this.minutes(), 2)
  4158.     }), R("Hmmss", 0, 0, function() {
  4159.         return "" + this.hours() + Q(this.minutes(), 2) + Q(this.seconds(), 2)
  4160.     }), jc("a", !0), jc("A", !1), J("hour", "h"), W("a", kc), W("A", kc), W("H", nd), W("h", nd), W("HH", nd, jd), W("hh", nd, jd), W("hmm", od), W("hmmss", pd), W("Hmm", od), W("Hmmss", pd), $(["H", "HH"], Ed), $(["a", "A"], function(a, b, c) {
  4161.         c._isPm = c._locale.isPM(a), c._meridiem = a
  4162.     }), $(["h", "hh"], function(a, b, c) {
  4163.         b[Ed] = r(a), j(c).bigHour = !0
  4164.     }), $("hmm", function(a, b, c) {
  4165.         var d = a.length - 2;
  4166.         b[Ed] = r(a.substr(0, d)), b[Fd] = r(a.substr(d)), j(c).bigHour = !0
  4167.     }), $("hmmss", function(a, b, c) {
  4168.         var d = a.length - 4,
  4169.             e = a.length - 2;
  4170.         b[Ed] = r(a.substr(0, d)), b[Fd] = r(a.substr(d, 2)), b[Gd] = r(a.substr(e)), j(c).bigHour = !0
  4171.     }), $("Hmm", function(a, b, c) {
  4172.         var d = a.length - 2;
  4173.         b[Ed] = r(a.substr(0, d)), b[Fd] = r(a.substr(d))
  4174.     }), $("Hmmss", function(a, b, c) {
  4175.         var d = a.length - 4,
  4176.             e = a.length - 2;
  4177.         b[Ed] = r(a.substr(0, d)), b[Fd] = r(a.substr(d, 2)), b[Gd] = r(a.substr(e))
  4178.     });
  4179.     var ie = /[ap]\.?m?\.?/i,
  4180.         je = M("Hours", !0);
  4181.     R("m", ["mm", 2], 0, "minute"), J("minute", "m"), W("m", nd), W("mm", nd, jd), $(["m", "mm"], Fd);
  4182.     var ke = M("Minutes", !1);
  4183.     R("s", ["ss", 2], 0, "second"), J("second", "s"), W("s", nd), W("ss", nd, jd), $(["s", "ss"], Gd);
  4184.     var le = M("Seconds", !1);
  4185.     R("S", 0, 0, function() {
  4186.         return ~~(this.millisecond() / 100)
  4187.     }), R(0, ["SS", 2], 0, function() {
  4188.         return ~~(this.millisecond() / 10)
  4189.     }), R(0, ["SSS", 3], 0, "millisecond"), R(0, ["SSSS", 4], 0, function() {
  4190.         return 10 * this.millisecond()
  4191.     }), R(0, ["SSSSS", 5], 0, function() {
  4192.         return 100 * this.millisecond()
  4193.     }), R(0, ["SSSSSS", 6], 0, function() {
  4194.         return 1e3 * this.millisecond()
  4195.     }), R(0, ["SSSSSSS", 7], 0, function() {
  4196.         return 1e4 * this.millisecond()
  4197.     }), R(0, ["SSSSSSSS", 8], 0, function() {
  4198.         return 1e5 * this.millisecond()
  4199.     }), R(0, ["SSSSSSSSS", 9], 0, function() {
  4200.         return 1e6 * this.millisecond()
  4201.     }), J("millisecond", "ms"), W("S", qd, id), W("SS", qd, jd), W("SSS", qd, kd);
  4202.     var me;
  4203.     for (me = "SSSS"; me.length <= 9; me += "S") W(me, td);
  4204.     for (me = "S"; me.length <= 9; me += "S") $(me, nc);
  4205.     var ne = M("Milliseconds", !1);
  4206.     R("z", 0, 0, "zoneAbbr"), R("zz", 0, 0, "zoneName");
  4207.     var oe = o.prototype;
  4208.     oe.add = ae, oe.calendar = jb, oe.clone = kb, oe.diff = rb, oe.endOf = Db, oe.format = vb, oe.from = wb, oe.fromNow = xb, oe.to = yb, oe.toNow = zb, oe.get = P, oe.invalidAt = Mb, oe.isAfter = lb, oe.isBefore = mb, oe.isBetween = nb, oe.isSame = ob, oe.isSameOrAfter = pb, oe.isSameOrBefore = qb, oe.isValid = Kb, oe.lang = ce, oe.locale = Ab, oe.localeData = Bb, oe.max = Xd, oe.min = Wd, oe.parsingFlags = Lb, oe.set = P, oe.startOf = Cb, oe.subtract = be, oe.toArray = Hb, oe.toObject = Ib, oe.toDate = Gb, oe.toISOString = ub, oe.toJSON = Jb, oe.toString = tb, oe.unix = Fb, oe.valueOf = Eb, oe.creationData = Nb, oe.year = Vd, oe.isLeapYear = sa, oe.weekYear = Pb, oe.isoWeekYear = Qb, oe.quarter = oe.quarters = Vb, oe.month = ga, oe.daysInMonth = ha, oe.week = oe.weeks = Zb, oe.isoWeek = oe.isoWeeks = $b, oe.weeksInYear = Sb, oe.isoWeeksInYear = Rb, oe.date = ee, oe.day = oe.days = ec, oe.weekday = fc, oe.isoWeekday = gc, oe.dayOfYear = hc, oe.hour = oe.hours = je, oe.minute = oe.minutes = ke, oe.second = oe.seconds = le, oe.millisecond = oe.milliseconds = ne, oe.utcOffset = Ta, oe.utc = Va, oe.local = Wa, oe.parseZone = Xa, oe.hasAlignedHourOffset = Ya, oe.isDST = Za, oe.isDSTShifted = $a, oe.isLocal = _a, oe.isUtcOffset = ab, oe.isUtc = bb, oe.isUTC = bb, oe.zoneAbbr = oc, oe.zoneName = pc, oe.dates = u("dates accessor is deprecated. Use date instead.", ee), oe.months = u("months accessor is deprecated. Use month instead", ga), oe.years = u("years accessor is deprecated. Use year instead", Vd), oe.zone = u("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779", Ua);
  4209.     var pe = oe,
  4210.         qe = {
  4211.             sameDay: "[Today at] LT",
  4212.             nextDay: "[Tomorrow at] LT",
  4213.             nextWeek: "dddd [at] LT",
  4214.             lastDay: "[Yesterday at] LT",
  4215.             lastWeek: "[Last] dddd [at] LT",
  4216.             sameElse: "L"
  4217.         },
  4218.         re = {
  4219.             LTS: "h:mm:ss A",
  4220.             LT: "h:mm A",
  4221.             L: "MM/DD/YYYY",
  4222.             LL: "MMMM D, YYYY",
  4223.             LLL: "MMMM D, YYYY h:mm A",
  4224.             LLLL: "dddd, MMMM D, YYYY h:mm A"
  4225.         },
  4226.         se = "Invalid date",
  4227.         te = "%d",
  4228.         ue = /\d{1,2}/,
  4229.         ve = {
  4230.             future: "in %s",
  4231.             past: "%s ago",
  4232.             s: "a few seconds",
  4233.             m: "a minute",
  4234.             mm: "%d minutes",
  4235.             h: "an hour",
  4236.             hh: "%d hours",
  4237.             d: "a day",
  4238.             dd: "%d days",
  4239.             M: "a month",
  4240.             MM: "%d months",
  4241.             y: "a year",
  4242.             yy: "%d years"
  4243.         },
  4244.         we = A.prototype;
  4245.     we._calendar = qe, we.calendar = sc, we._longDateFormat = re, we.longDateFormat = tc, we._invalidDate = se, we.invalidDate = uc, we._ordinal = te, we.ordinal = vc, we._ordinalParse = ue, we.preparse = wc, we.postformat = wc, we._relativeTime = ve, we.relativeTime = xc, we.pastFuture = yc, we.set = y, we.months = ca, we._months = Ld, we.monthsShort = da, we._monthsShort = Md, we.monthsParse = ea, we._monthsRegex = Od, we.monthsRegex = ja, we._monthsShortRegex = Nd, we.monthsShortRegex = ia, we.week = Wb, we._week = de, we.firstDayOfYear = Yb, we.firstDayOfWeek = Xb, we.weekdays = ac, we._weekdays = fe, we.weekdaysMin = cc, we._weekdaysMin = he, we.weekdaysShort = bc, we._weekdaysShort = ge, we.weekdaysParse = dc, we.isPM = lc, we._meridiemParse = ie, we.meridiem = mc, E("en", {
  4246.         ordinalParse: /\d{1,2}(th|st|nd|rd)/,
  4247.         ordinal: function(a) {
  4248.             var b = a % 10,
  4249.                 c = 1 === r(a % 100 / 10) ? "th" : 1 === b ? "st" : 2 === b ? "nd" : 3 === b ? "rd" : "th";
  4250.             return a + c
  4251.         }
  4252.     }), a.lang = u("moment.lang is deprecated. Use moment.locale instead.", E), a.langData = u("moment.langData is deprecated. Use moment.localeData instead.", H);
  4253.     var xe = Math.abs,
  4254.         ye = Qc("ms"),
  4255.         ze = Qc("s"),
  4256.         Ae = Qc("m"),
  4257.         Be = Qc("h"),
  4258.         Ce = Qc("d"),
  4259.         De = Qc("w"),
  4260.         Ee = Qc("M"),
  4261.         Fe = Qc("y"),
  4262.         Ge = Sc("milliseconds"),
  4263.         He = Sc("seconds"),
  4264.         Ie = Sc("minutes"),
  4265.         Je = Sc("hours"),
  4266.         Ke = Sc("days"),
  4267.         Le = Sc("months"),
  4268.         Me = Sc("years"),
  4269.         Ne = Math.round,
  4270.         Oe = {
  4271.             s: 45,
  4272.             m: 45,
  4273.             h: 22,
  4274.             d: 26,
  4275.             M: 11
  4276.         },
  4277.         Pe = Math.abs,
  4278.         Qe = Na.prototype;
  4279.     Qe.abs = Gc, Qe.add = Ic, Qe.subtract = Jc, Qe.as = Oc, Qe.asMilliseconds = ye, Qe.asSeconds = ze, Qe.asMinutes = Ae, Qe.asHours = Be, Qe.asDays = Ce, Qe.asWeeks = De, Qe.asMonths = Ee, Qe.asYears = Fe, Qe.valueOf = Pc, Qe._bubble = Lc, Qe.get = Rc, Qe.milliseconds = Ge, Qe.seconds = He, Qe.minutes = Ie, Qe.hours = Je, Qe.days = Ke, Qe.weeks = Tc, Qe.months = Le, Qe.years = Me, Qe.humanize = Xc, Qe.toISOString = Yc, Qe.toString = Yc, Qe.toJSON = Yc, Qe.locale = Ab, Qe.localeData = Bb, Qe.toIsoString = u("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)", Yc), Qe.lang = ce, R("X", 0, 0, "unix"), R("x", 0, 0, "valueOf"), W("x", ud), W("X", xd), $("X", function(a, b, c) {
  4280.         c._d = new Date(1e3 * parseFloat(a, 10))
  4281.     }), $("x", function(a, b, c) {
  4282.         c._d = new Date(r(a))
  4283.     }), a.version = "2.12.0", b(Ja), a.fn = pe, a.min = La, a.max = Ma, a.now = Yd, a.utc = h, a.unix = qc, a.months = Bc, a.isDate = d, a.locale = E, a.invalid = l, a.duration = cb, a.isMoment = p, a.weekdays = Dc, a.parseZone = rc, a.localeData = H, a.isDuration = Oa, a.monthsShort = Cc, a.weekdaysMin = Fc, a.defineLocale = F, a.updateLocale = G, a.locales = I, a.weekdaysShort = Ec, a.normalizeUnits = K, a.relativeTimeThreshold = Wc, a.prototype = pe;
  4284.     var Re = a;
  4285.     return Re
  4286. }), angular.module("bootstrapLightbox", ["ui.bootstrap"]);
  4287. try {
  4288.     angular.module("angular-loading-bar"), angular.module("bootstrapLightbox").requires.push("angular-loading-bar")
  4289. } catch (e) {}
  4290. try {
  4291.     angular.module("ngTouch"), angular.module("bootstrapLightbox").requires.push("ngTouch")
  4292. } catch (e) {}
  4293. try {
  4294.     angular.module("videosharing-embed"), angular.module("bootstrapLightbox").requires.push("videosharing-embed")
  4295. } catch (e) {}
  4296. angular.module("bootstrapLightbox").run(["$templateCache", function(a) {
  4297.         "use strict";
  4298.         a.put("lightbox.html", '<div class=modal-body ng-swipe-left=Lightbox.nextImage() ng-swipe-right=Lightbox.prevImage()><div class=lightbox-nav><button class=close aria-hidden=true ng-click=$dismiss()>×</button><div class=btn-group ng-if="Lightbox.images.length > 1"><a class="btn btn-xs btn-default" ng-click=Lightbox.prevImage()>‹ Previous</a> <a ng-href={{Lightbox.imageUrl}} target=_blank class="btn btn-xs btn-default" title="Open in new tab">Open image in new tab</a> <a class="btn btn-xs btn-default" ng-click=Lightbox.nextImage()>Next ›</a></div></div><div class=lightbox-image-container><div class=lightbox-image-caption><span>{{Lightbox.imageCaption}}</span></div><img ng-if=!Lightbox.isVideo(Lightbox.image) lightbox-src={{Lightbox.imageUrl}}><div ng-if=Lightbox.isVideo(Lightbox.image) class="embed-responsive embed-responsive-16by9"><video ng-if=!Lightbox.isSharedVideo(Lightbox.image) lightbox-src={{Lightbox.imageUrl}} controls autoplay></video><embed-video ng-if=Lightbox.isSharedVideo(Lightbox.image) lightbox-src={{Lightbox.imageUrl}} ng-href={{Lightbox.imageUrl}} iframe-id=lightbox-video class=embed-responsive-item><a ng-href={{Lightbox.imageUrl}}>Watch video</a></embed-video></div></div></div>')
  4299.     }]), angular.module("bootstrapLightbox").service("ImageLoader", ["$q", function(a) {
  4300.         this.load = function(b) {
  4301.             var c = a.defer(),
  4302.                 d = new Image;
  4303.             return d.onload = function() {
  4304.                 ("boolean" == typeof this.complete && this.complete === !1 || "number" == typeof this.naturalWidth && 0 === this.naturalWidth) && c.reject(), c.resolve(d)
  4305.             }, d.onerror = function() {
  4306.                 c.reject()
  4307.             }, d.src = b, c.promise
  4308.         }
  4309.     }]), angular.module("bootstrapLightbox").provider("Lightbox", function() {
  4310.         this.templateUrl = "lightbox.html", this.fullScreenMode = !1, this.getImageUrl = function(a) {
  4311.             return "string" == typeof a ? a : a.url
  4312.         }, this.getImageCaption = function(a) {
  4313.             return a.caption
  4314.         }, this.calculateImageDimensionLimits = function(a) {
  4315.             return a.windowWidth >= 768 ? {
  4316.                 maxWidth: a.windowWidth - 92,
  4317.                 maxHeight: a.windowHeight - 126
  4318.             } : {
  4319.                 maxWidth: a.windowWidth - 52,
  4320.                 maxHeight: a.windowHeight - 86
  4321.             }
  4322.         }, this.calculateModalDimensions = function(a) {
  4323.             var b = Math.max(400, a.imageDisplayWidth + 32),
  4324.                 c = Math.max(200, a.imageDisplayHeight + 66);
  4325.             return (b >= a.windowWidth - 20 || a.windowWidth < 768) && (b = "auto"), c >= a.windowHeight && (c = "auto"), {
  4326.                 width: b,
  4327.                 height: c
  4328.             }
  4329.         }, this.isVideo = function(a) {
  4330.             return "object" == typeof a && a && a.type ? "video" === a.type : !1
  4331.         }, this.isSharedVideo = function(a) {
  4332.             return this.isVideo(a) && !this.getImageUrl(a).match(/\.(mp4|ogg|webm)$/)
  4333.         }, this.$get = ["$document", "$injector", "$uibModal", "$timeout", "ImageLoader", function(a, b, c, d, e) {
  4334.             var f = b.has("cfpLoadingBar") ? b.get("cfpLoadingBar") : null,
  4335.                 g = {};
  4336.             return g.images = [], g.index = -1, g.templateUrl = this.templateUrl, g.fullScreenMode = this.fullScreenMode, g.getImageUrl = this.getImageUrl, g.getImageCaption = this.getImageCaption, g.calculateImageDimensionLimits = this.calculateImageDimensionLimits, g.calculateModalDimensions = this.calculateModalDimensions, g.isVideo = this.isVideo, g.isSharedVideo = this.isSharedVideo, g.keyboardNavEnabled = !1, g.image = {}, g.modalInstance = null, g.loading = !1, g.openModal = function(a, b, d) {
  4337.                 return g.images = a, g.setImage(b), g.modalInstance = c.open(angular.extend({
  4338.                     templateUrl: g.templateUrl,
  4339.                     controller: ["$scope", function(a) {
  4340.                         a.Lightbox = g, g.keyboardNavEnabled = !0
  4341.                     }],
  4342.                     windowClass: "lightbox-modal"
  4343.                 }, d || {})), g.modalInstance.result["finally"](function() {
  4344.                     g.images = [], g.index = 1, g.image = {}, g.imageUrl = null, g.imageCaption = null, g.keyboardNavEnabled = !1, f && f.complete()
  4345.                 }), g.modalInstance
  4346.             }, g.closeModal = function(a) {
  4347.                 return g.modalInstance.close(a)
  4348.             }, g.setImage = function(a) {
  4349.                 if (!(a in g.images)) throw "Invalid image.";
  4350.                 g.loading = !0, f && f.start();
  4351.                 var b = g.images[a],
  4352.                     c = g.getImageUrl(b),
  4353.                     d = function(d) {
  4354.                         d = d || {}, g.index = d.index || a, g.image = d.image || b, g.imageUrl = d.imageUrl || c, g.imageCaption = d.imageCaption || g.getImageCaption(b), g.loading = !1, f && f.complete()
  4355.                     };
  4356.                 g.isVideo(b) ? d() : e.load(c).then(function() {
  4357.                     d()
  4358.                 }, function() {
  4359.                     d({
  4360.                         imageUrl: "//:0",
  4361.                         imageCaption: "Failed to load image"
  4362.                     })
  4363.                 })
  4364.             }, g.firstImage = function() {
  4365.                 g.setImage(0)
  4366.             }, g.prevImage = function() {
  4367.                 g.setImage((g.index - 1 + g.images.length) % g.images.length)
  4368.             }, g.nextImage = function() {
  4369.                 g.setImage((g.index + 1) % g.images.length)
  4370.             }, g.lastImage = function() {
  4371.                 g.setImage(g.images.length - 1)
  4372.             }, g.setImages = function(a) {
  4373.                 g.images = a, g.setImage(g.index)
  4374.             }, a.bind("keydown", function(a) {
  4375.                 if (g.keyboardNavEnabled) {
  4376.                     var b = null;
  4377.                     switch (a.which) {
  4378.                         case 39:
  4379.                             b = "nextImage";
  4380.                             break;
  4381.                         case 37:
  4382.                             b = "prevImage"
  4383.                     }
  4384.                     null !== b && -1 === ["input", "textarea"].indexOf(a.target.tagName.toLowerCase()) && (d(function() {
  4385.                         g[b]()
  4386.                     }), a.preventDefault())
  4387.                 }
  4388.             }), g
  4389.         }]
  4390.     }), angular.module("bootstrapLightbox").directive("lightboxSrc", ["$window", "ImageLoader", "Lightbox", function(a, b, c) {
  4391.         var d = function(a, b) {
  4392.                 var c = a.width,
  4393.                     d = a.height,
  4394.                     e = a.minWidth,
  4395.                     f = a.minHeight,
  4396.                     g = a.maxWidth,
  4397.                     h = a.maxHeight,
  4398.                     i = c,
  4399.                     j = d;
  4400.                 if (b) {
  4401.                     var k = Math.min(g / c, h / d),
  4402.                         l = Math.round(c * k),
  4403.                         m = Math.round(d * k);
  4404.                     i = Math.max(e, l), j = Math.max(f, m)
  4405.                 } else e > c && f > d ? c / d > g / h ? (j = f, i = Math.round(c * f / d)) : (i = e, j = Math.round(d * e / c)) : e > c ? (i = e, j = Math.round(d * e / c)) : f > d && (j = f, i = Math.round(c * f / d)), c > g && d > h ? c / d > g / h ? (i = g, j = Math.round(d * g / c)) : (j = h, i = Math.round(c * h / d)) : c > g ? (i = g, j = Math.round(d * g / c)) : d > h && (j = h, i = Math.round(c * h / d));
  4406.                 return {
  4407.                     width: i || 0,
  4408.                     height: j || 0
  4409.                 }
  4410.             },
  4411.             e = function(a) {
  4412.                 return "number" == typeof a ? a + "px" : a
  4413.             },
  4414.             f = 0,
  4415.             g = 0;
  4416.         return {
  4417.             link: function(h, i, j) {
  4418.                 var k = function() {
  4419.                     var b = a.innerWidth,
  4420.                         h = a.innerHeight,
  4421.                         j = c.calculateImageDimensionLimits({
  4422.                             windowWidth: b,
  4423.                             windowHeight: h,
  4424.                             imageWidth: f,
  4425.                             imageHeight: g
  4426.                         }),
  4427.                         k = d(angular.extend({
  4428.                             width: f,
  4429.                             height: g,
  4430.                             minWidth: 1,
  4431.                             minHeight: 1,
  4432.                             maxWidth: 3e3,
  4433.                             maxHeight: 3e3
  4434.                         }, j), c.fullScreenMode),
  4435.                         l = c.calculateModalDimensions({
  4436.                             windowWidth: b,
  4437.                             windowHeight: h,
  4438.                             imageDisplayWidth: k.width,
  4439.                             imageDisplayHeight: k.height
  4440.                         });
  4441.                     i.css({
  4442.                         width: k.width + "px",
  4443.                         height: k.height + "px"
  4444.                     }), angular.element(document.querySelector(".lightbox-modal .modal-dialog")).css({
  4445.                         width: e(l.width)
  4446.                     }), angular.element(document.querySelector(".lightbox-modal .modal-content")).css({
  4447.                         height: e(l.height)
  4448.                     })
  4449.                 };
  4450.                 h.$watch(function() {
  4451.                     return j.lightboxSrc
  4452.                 }, function(a) {
  4453.                     c.isVideo(c.image) ? (f = 1280, g = 720, k(), i[0].src = a) : (i[0].src = "//:0", b.load(a).then(function(b) {
  4454.                         f = b.naturalWidth, g = b.naturalHeight, k(), i[0].src = a
  4455.                     }, function() {
  4456.                         f = 0, g = 0, k()
  4457.                     }))
  4458.                 }), angular.element(a).on("resize", k)
  4459.             }
  4460.         }
  4461.     }]),
  4462.     function() {
  4463.         "use strict";
  4464.  
  4465.         function a(a, b) {
  4466.             return a.module("angularMoment", []).constant("angularMomentConfig", {
  4467.                 preprocess: null,
  4468.                 timezone: "",
  4469.                 format: null,
  4470.                 statefulFilters: !0
  4471.             }).constant("moment", b).constant("amTimeAgoConfig", {
  4472.                 withoutSuffix: !1,
  4473.                 serverTime: null,
  4474.                 titleFormat: null,
  4475.                 fullDateThreshold: null,
  4476.                 fullDateFormat: null
  4477.             }).directive("amTimeAgo", ["$window", "moment", "amMoment", "amTimeAgoConfig", "angularMomentConfig", function(b, c, d, e, f) {
  4478.                 return function(g, h, i) {
  4479.                     function j() {
  4480.                         var a;
  4481.                         if (p) a = p;
  4482.                         else if (e.serverTime) {
  4483.                             var b = (new Date).getTime(),
  4484.                                 d = b - w + e.serverTime;
  4485.                             a = c(d)
  4486.                         } else a = c();
  4487.                         return a
  4488.                     }
  4489.  
  4490.                     function k() {
  4491.                         q && (b.clearTimeout(q), q = null)
  4492.                     }
  4493.  
  4494.                     function l(a) {
  4495.                         var c = j().diff(a, "day"),
  4496.                             d = u && c >= u;
  4497.                         if (d ? h.text(a.format(v)) : h.text(a.from(j(), s)), t && !h.attr("title") && h.attr("title", a.local().format(t)), !d) {
  4498.                             var e = Math.abs(j().diff(a, "minute")),
  4499.                                 f = 3600;
  4500.                             1 > e ? f = 1 : 60 > e ? f = 30 : 180 > e && (f = 300), q = b.setTimeout(function() {
  4501.                                 l(a)
  4502.                             }, 1e3 * f)
  4503.                         }
  4504.                     }
  4505.  
  4506.                     function m(a) {
  4507.                         z && h.attr("datetime", a)
  4508.                     }
  4509.  
  4510.                     function n() {
  4511.                         if (k(), o) {
  4512.                             var a = d.preprocessDate(o, x, r);
  4513.                             l(a), m(a.toISOString())
  4514.                         }
  4515.                     }
  4516.                     var o, p, q = null,
  4517.                         r = f.format,
  4518.                         s = e.withoutSuffix,
  4519.                         t = e.titleFormat,
  4520.                         u = e.fullDateThreshold,
  4521.                         v = e.fullDateFormat,
  4522.                         w = (new Date).getTime(),
  4523.                         x = f.preprocess,
  4524.                         y = i.amTimeAgo,
  4525.                         z = "TIME" === h[0].nodeName.toUpperCase();
  4526.                     g.$watch(y, function(a) {
  4527.                         return "undefined" == typeof a || null === a || "" === a ? (k(), void(o && (h.text(""), m(""), o = null))) : (o = a, void n())
  4528.                     }), a.isDefined(i.amFrom) && g.$watch(i.amFrom, function(a) {
  4529.                         p = "undefined" == typeof a || null === a || "" === a ? null : c(a), n()
  4530.                     }), a.isDefined(i.amWithoutSuffix) && g.$watch(i.amWithoutSuffix, function(a) {
  4531.                         "boolean" == typeof a ? (s = a, n()) : s = e.withoutSuffix
  4532.                     }), i.$observe("amFormat", function(a) {
  4533.                         "undefined" != typeof a && (r = a, n())
  4534.                     }), i.$observe("amPreprocess", function(a) {
  4535.                         x = a, n()
  4536.                     }), i.$observe("amFullDateThreshold", function(a) {
  4537.                         u = a, n()
  4538.                     }), i.$observe("amFullDateFormat", function(a) {
  4539.                         v = a, n()
  4540.                     }), g.$on("$destroy", function() {
  4541.                         k()
  4542.                     }), g.$on("amMoment:localeChanged", function() {
  4543.                         n()
  4544.                     })
  4545.                 }
  4546.             }]).service("amMoment", ["moment", "$rootScope", "$log", "angularMomentConfig", function(b, c, d, e) {
  4547.                 this.preprocessors = {
  4548.                     utc: b.utc,
  4549.                     unix: b.unix
  4550.                 }, this.changeLocale = function(d, e) {
  4551.                     var f = b.locale(d, e);
  4552.                     return a.isDefined(d) && c.$broadcast("amMoment:localeChanged"), f
  4553.                 }, this.changeTimezone = function(a) {
  4554.                     e.timezone = a, c.$broadcast("amMoment:timezoneChanged")
  4555.                 }, this.preprocessDate = function(c, f, g) {
  4556.                     return a.isUndefined(f) && (f = e.preprocess), this.preprocessors[f] ? this.preprocessors[f](c, g) : (f && d.warn("angular-moment: Ignoring unsupported value for preprocess: " + f), !isNaN(parseFloat(c)) && isFinite(c) ? b(parseInt(c, 10)) : b(c, g))
  4557.                 }, this.applyTimezone = function(a, b) {
  4558.                     return (b = b || e.timezone) ? (b.match(/^Z|[+-]\d\d:?\d\d$/i) ? a = a.utcOffset(b) : a.tz ? a = a.tz(b) : d.warn("angular-moment: named timezone specified but moment.tz() is undefined. Did you forget to include moment-timezone.js?"), a) : a
  4559.                 }
  4560.             }]).filter("amCalendar", ["moment", "amMoment", "angularMomentConfig", function(a, b, c) {
  4561.                 function d(c, d, e) {
  4562.                     if ("undefined" == typeof c || null === c) return "";
  4563.                     c = b.preprocessDate(c, d);
  4564.                     var f = a(c);
  4565.                     return f.isValid() ? b.applyTimezone(f, e).calendar() : ""
  4566.                 }
  4567.                 return d.$stateful = c.statefulFilters, d
  4568.             }]).filter("amDifference", ["moment", "amMoment", "angularMomentConfig", function(a, b, c) {
  4569.                 function d(c, d, e, f, g, h) {
  4570.                     if ("undefined" == typeof c || null === c) return "";
  4571.                     c = b.preprocessDate(c, g);
  4572.                     var i = a(c);
  4573.                     if (!i.isValid()) return "";
  4574.                     var j;
  4575.                     if ("undefined" == typeof d || null === d) j = a();
  4576.                     else if (d = b.preprocessDate(d, h), j = a(d), !j.isValid()) return "";
  4577.                     return b.applyTimezone(i).diff(b.applyTimezone(j), e, f)
  4578.                 }
  4579.                 return d.$stateful = c.statefulFilters, d
  4580.             }]).filter("amDateFormat", ["moment", "amMoment", "angularMomentConfig", function(a, b, c) {
  4581.                 function d(d, e, f, g, h) {
  4582.                     var i = h || c.format;
  4583.                     if ("undefined" == typeof d || null === d) return "";
  4584.                     d = b.preprocessDate(d, f, i);
  4585.                     var j = a(d);
  4586.                     return j.isValid() ? b.applyTimezone(j, g).format(e) : ""
  4587.                 }
  4588.                 return d.$stateful = c.statefulFilters, d
  4589.             }]).filter("amDurationFormat", ["moment", "angularMomentConfig", function(a, b) {
  4590.                 function c(b, c, d) {
  4591.                     return "undefined" == typeof b || null === b ? "" : a.duration(b, c).humanize(d)
  4592.                 }
  4593.                 return c.$stateful = b.statefulFilters, c
  4594.             }]).filter("amTimeAgo", ["moment", "amMoment", "angularMomentConfig", function(a, b, c) {
  4595.                 function d(c, d, e, f) {
  4596.                     var g, h;
  4597.                     return "undefined" == typeof c || null === c ? "" : (c = b.preprocessDate(c, d), g = a(c), g.isValid() ? (h = a(f), "undefined" != typeof f && h.isValid() ? b.applyTimezone(g).from(h, e) : b.applyTimezone(g).fromNow(e)) : "")
  4598.                 }
  4599.                 return d.$stateful = c.statefulFilters, d
  4600.             }]).filter("amSubtract", ["moment", "angularMomentConfig", function(a, b) {
  4601.                 function c(b, c, d) {
  4602.                     return "undefined" == typeof b || null === b ? "" : a(b).subtract(parseInt(c, 10), d)
  4603.                 }
  4604.                 return c.$stateful = b.statefulFilters, c
  4605.             }]).filter("amAdd", ["moment", "angularMomentConfig", function(a, b) {
  4606.                 function c(b, c, d) {
  4607.                     return "undefined" == typeof b || null === b ? "" : a(b).add(parseInt(c, 10), d)
  4608.                 }
  4609.                 return c.$stateful = b.statefulFilters, c
  4610.             }])
  4611.         }
  4612.         "function" == typeof define && define.amd ? define(["angular", "moment"], a) : "undefined" != typeof module && module && module.exports ? (a(angular, require("moment")), module.exports = "angularMoment") : a(angular, ("undefined" != typeof global ? global : window).moment)
  4613.     }(), "undefined" != typeof module && "undefined" != typeof exports && module.exports === exports && (module.exports = "ui.router"),
  4614.     function(a, b, c) {
  4615.         "use strict";
  4616.  
  4617.         function d(a, b) {
  4618.             return R(new(R(function() {}, {
  4619.                 prototype: a
  4620.             })), b)
  4621.         }
  4622.  
  4623.         function e(a) {
  4624.             return Q(arguments, function(b) {
  4625.                 b !== a && Q(b, function(b, c) {
  4626.                     a.hasOwnProperty(c) || (a[c] = b)
  4627.                 })
  4628.             }), a
  4629.         }
  4630.  
  4631.         function f(a, b) {
  4632.             var c = [];
  4633.             for (var d in a.path) {
  4634.                 if (a.path[d] !== b.path[d]) break;
  4635.                 c.push(a.path[d])
  4636.             }
  4637.             return c
  4638.         }
  4639.  
  4640.         function g(a) {
  4641.             if (Object.keys) return Object.keys(a);
  4642.             var b = [];
  4643.             return Q(a, function(a, c) {
  4644.                 b.push(c)
  4645.             }), b
  4646.         }
  4647.  
  4648.         function h(a, b) {
  4649.             if (Array.prototype.indexOf) return a.indexOf(b, Number(arguments[2]) || 0);
  4650.             var c = a.length >>> 0,
  4651.                 d = Number(arguments[2]) || 0;
  4652.             for (d = 0 > d ? Math.ceil(d) : Math.floor(d), 0 > d && (d += c); c > d; d++)
  4653.                 if (d in a && a[d] === b) return d;
  4654.             return -1
  4655.         }
  4656.  
  4657.         function i(a, b, c, d) {
  4658.             var e, i = f(c, d),
  4659.                 j = {},
  4660.                 k = [];
  4661.             for (var l in i)
  4662.                 if (i[l] && i[l].params && (e = g(i[l].params), e.length))
  4663.                     for (var m in e) h(k, e[m]) >= 0 || (k.push(e[m]), j[e[m]] = a[e[m]]);
  4664.             return R({}, j, b)
  4665.         }
  4666.  
  4667.         function j(a, b, c) {
  4668.             if (!c) {
  4669.                 c = [];
  4670.                 for (var d in a) c.push(d)
  4671.             }
  4672.             for (var e = 0; e < c.length; e++) {
  4673.                 var f = c[e];
  4674.                 if (a[f] != b[f]) return !1
  4675.             }
  4676.             return !0
  4677.         }
  4678.  
  4679.         function k(a, b) {
  4680.             var c = {};
  4681.             return Q(a, function(a) {
  4682.                 c[a] = b[a]
  4683.             }), c
  4684.         }
  4685.  
  4686.         function l(a) {
  4687.             var b = {},
  4688.                 c = Array.prototype.concat.apply(Array.prototype, Array.prototype.slice.call(arguments, 1));
  4689.             return Q(c, function(c) {
  4690.                 c in a && (b[c] = a[c])
  4691.             }), b
  4692.         }
  4693.  
  4694.         function m(a) {
  4695.             var b = {},
  4696.                 c = Array.prototype.concat.apply(Array.prototype, Array.prototype.slice.call(arguments, 1));
  4697.             for (var d in a) - 1 == h(c, d) && (b[d] = a[d]);
  4698.             return b
  4699.         }
  4700.  
  4701.         function n(a, b) {
  4702.             var c = P(a),
  4703.                 d = c ? [] : {};
  4704.             return Q(a, function(a, e) {
  4705.                 b(a, e) && (d[c ? d.length : e] = a)
  4706.             }), d
  4707.         }
  4708.  
  4709.         function o(a, b) {
  4710.             var c = P(a) ? [] : {};
  4711.             return Q(a, function(a, d) {
  4712.                 c[d] = b(a, d)
  4713.             }), c
  4714.         }
  4715.  
  4716.         function p(a, b) {
  4717.             var d = 1,
  4718.                 f = 2,
  4719.                 i = {},
  4720.                 j = [],
  4721.                 k = i,
  4722.                 l = R(a.when(i), {
  4723.                     $$promises: i,
  4724.                     $$values: i
  4725.                 });
  4726.             this.study = function(i) {
  4727.                 function n(a, c) {
  4728.                     if (s[c] !== f) {
  4729.                         if (r.push(c), s[c] === d) throw r.splice(0, h(r, c)), new Error("Cyclic dependency: " + r.join(" -> "));
  4730.                         if (s[c] = d, N(a)) q.push(c, [function() {
  4731.                             return b.get(a)
  4732.                         }], j);
  4733.                         else {
  4734.                             var e = b.annotate(a);
  4735.                             Q(e, function(a) {
  4736.                                 a !== c && i.hasOwnProperty(a) && n(i[a], a)
  4737.                             }), q.push(c, a, e)
  4738.                         }
  4739.                         r.pop(), s[c] = f
  4740.                     }
  4741.                 }
  4742.  
  4743.                 function o(a) {
  4744.                     return O(a) && a.then && a.$$promises
  4745.                 }
  4746.                 if (!O(i)) throw new Error("'invocables' must be an object");
  4747.                 var p = g(i || {}),
  4748.                     q = [],
  4749.                     r = [],
  4750.                     s = {};
  4751.                 return Q(i, n), i = r = s = null,
  4752.                     function(d, f, g) {
  4753.                         function h() {
  4754.                             --u || (v || e(t, f.$$values), r.$$values = t, r.$$promises = r.$$promises || !0, delete r.$$inheritedValues, n.resolve(t))
  4755.                         }
  4756.  
  4757.                         function i(a) {
  4758.                             r.$$failure = a, n.reject(a)
  4759.                         }
  4760.  
  4761.                         function j(c, e, f) {
  4762.                             function j(a) {
  4763.                                 l.reject(a), i(a)
  4764.                             }
  4765.  
  4766.                             function k() {
  4767.                                 if (!L(r.$$failure)) try {
  4768.                                     l.resolve(b.invoke(e, g, t)), l.promise.then(function(a) {
  4769.                                         t[c] = a, h()
  4770.                                     }, j)
  4771.                                 } catch (a) {
  4772.                                     j(a)
  4773.                                 }
  4774.                             }
  4775.                             var l = a.defer(),
  4776.                                 m = 0;
  4777.                             Q(f, function(a) {
  4778.                                 s.hasOwnProperty(a) && !d.hasOwnProperty(a) && (m++, s[a].then(function(b) {
  4779.                                     t[a] = b, --m || k()
  4780.                                 }, j))
  4781.                             }), m || k(), s[c] = l.promise
  4782.                         }
  4783.                         if (o(d) && g === c && (g = f, f = d, d = null), d) {
  4784.                             if (!O(d)) throw new Error("'locals' must be an object")
  4785.                         } else d = k;
  4786.                         if (f) {
  4787.                             if (!o(f)) throw new Error("'parent' must be a promise returned by $resolve.resolve()")
  4788.                         } else f = l;
  4789.                         var n = a.defer(),
  4790.                             r = n.promise,
  4791.                             s = r.$$promises = {},
  4792.                             t = R({}, d),
  4793.                             u = 1 + q.length / 3,
  4794.                             v = !1;
  4795.                         if (L(f.$$failure)) return i(f.$$failure), r;
  4796.                         f.$$inheritedValues && e(t, m(f.$$inheritedValues, p)), R(s, f.$$promises), f.$$values ? (v = e(t, m(f.$$values, p)), r.$$inheritedValues = m(f.$$values, p), h()) : (f.$$inheritedValues && (r.$$inheritedValues = m(f.$$inheritedValues, p)), f.then(h, i));
  4797.                         for (var w = 0, x = q.length; x > w; w += 3) d.hasOwnProperty(q[w]) ? h() : j(q[w], q[w + 1], q[w + 2]);
  4798.                         return r
  4799.                     }
  4800.             }, this.resolve = function(a, b, c, d) {
  4801.                 return this.study(a)(b, c, d)
  4802.             }
  4803.         }
  4804.  
  4805.         function q(a, b, c) {
  4806.             this.fromConfig = function(a, b, c) {
  4807.                 return L(a.template) ? this.fromString(a.template, b) : L(a.templateUrl) ? this.fromUrl(a.templateUrl, b) : L(a.templateProvider) ? this.fromProvider(a.templateProvider, b, c) : null
  4808.             }, this.fromString = function(a, b) {
  4809.                 return M(a) ? a(b) : a
  4810.             }, this.fromUrl = function(c, d) {
  4811.                 return M(c) && (c = c(d)), null == c ? null : a.get(c, {
  4812.                     cache: b,
  4813.                     headers: {
  4814.                         Accept: "text/html"
  4815.                     }
  4816.                 }).then(function(a) {
  4817.                     return a.data
  4818.                 })
  4819.             }, this.fromProvider = function(a, b, d) {
  4820.                 return c.invoke(a, null, d || {
  4821.                     params: b
  4822.                 })
  4823.             }
  4824.         }
  4825.  
  4826.         function r(a, b, e) {
  4827.             function f(b, c, d, e) {
  4828.                 if (q.push(b), o[b]) return o[b];
  4829.                 if (!/^\w+([-.]+\w+)*(?:\[\])?$/.test(b)) throw new Error("Invalid parameter name '" + b + "' in pattern '" + a + "'");
  4830.                 if (p[b]) throw new Error("Duplicate parameter name '" + b + "' in pattern '" + a + "'");
  4831.                 return p[b] = new U.Param(b, c, d, e), p[b]
  4832.             }
  4833.  
  4834.             function g(a, b, c, d) {
  4835.                 var e = ["", ""],
  4836.                     f = a.replace(/[\\\[\]\^$*+?.()|{}]/g, "\\$&");
  4837.                 if (!b) return f;
  4838.                 switch (c) {
  4839.                     case !1:
  4840.                         e = ["(", ")" + (d ? "?" : "")];
  4841.                         break;
  4842.                     case !0:
  4843.                         f = f.replace(/\/$/, ""), e = ["(?:/(", ")|/)?"];
  4844.                         break;
  4845.                     default:
  4846.                         e = ["(" + c + "|", ")?"]
  4847.                 }
  4848.                 return f + e[0] + b + e[1]
  4849.             }
  4850.  
  4851.             function h(e, f) {
  4852.                 var g, h, i, j, k;
  4853.                 return g = e[2] || e[3], k = b.params[g], i = a.substring(m, e.index), h = f ? e[4] : e[4] || ("*" == e[1] ? ".*" : null), h && (j = U.type(h) || d(U.type("string"), {
  4854.                     pattern: new RegExp(h, b.caseInsensitive ? "i" : c)
  4855.                 })), {
  4856.                     id: g,
  4857.                     regexp: h,
  4858.                     segment: i,
  4859.                     type: j,
  4860.                     cfg: k
  4861.                 }
  4862.             }
  4863.             b = R({
  4864.                 params: {}
  4865.             }, O(b) ? b : {});
  4866.             var i, j = /([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,
  4867.                 k = /([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,
  4868.                 l = "^",
  4869.                 m = 0,
  4870.                 n = this.segments = [],
  4871.                 o = e ? e.params : {},
  4872.                 p = this.params = e ? e.params.$$new() : new U.ParamSet,
  4873.                 q = [];
  4874.             this.source = a;
  4875.             for (var r, s, t;
  4876.                 (i = j.exec(a)) && (r = h(i, !1), !(r.segment.indexOf("?") >= 0));) s = f(r.id, r.type, r.cfg, "path"), l += g(r.segment, s.type.pattern.source, s.squash, s.isOptional), n.push(r.segment), m = j.lastIndex;
  4877.             t = a.substring(m);
  4878.             var u = t.indexOf("?");
  4879.             if (u >= 0) {
  4880.                 var v = this.sourceSearch = t.substring(u);
  4881.                 if (t = t.substring(0, u), this.sourcePath = a.substring(0, m + u), v.length > 0)
  4882.                     for (m = 0; i = k.exec(v);) r = h(i, !0), s = f(r.id, r.type, r.cfg, "search"), m = j.lastIndex
  4883.             } else this.sourcePath = a, this.sourceSearch = "";
  4884.             l += g(t) + (b.strict === !1 ? "/?" : "") + "$", n.push(t), this.regexp = new RegExp(l, b.caseInsensitive ? "i" : c), this.prefix = n[0], this.$$paramNames = q
  4885.         }
  4886.  
  4887.         function s(a) {
  4888.             R(this, a)
  4889.         }
  4890.  
  4891.         function t() {
  4892.             function a(a) {
  4893.                 return null != a ? a.toString().replace(/~/g, "~~").replace(/\//g, "~2F") : a
  4894.             }
  4895.  
  4896.             function e(a) {
  4897.                 return null != a ? a.toString().replace(/~2F/g, "/").replace(/~~/g, "~") : a
  4898.             }
  4899.  
  4900.             function f() {
  4901.                 return {
  4902.                     strict: p,
  4903.                     caseInsensitive: m
  4904.                 }
  4905.             }
  4906.  
  4907.             function i(a) {
  4908.                 return M(a) || P(a) && M(a[a.length - 1])
  4909.             }
  4910.  
  4911.             function j() {
  4912.                 for (; w.length;) {
  4913.                     var a = w.shift();
  4914.                     if (a.pattern) throw new Error("You cannot override a type's .pattern at runtime.");
  4915.                     b.extend(u[a.name], l.invoke(a.def))
  4916.                 }
  4917.             }
  4918.  
  4919.             function k(a) {
  4920.                 R(this, a || {})
  4921.             }
  4922.             U = this;
  4923.             var l, m = !1,
  4924.                 p = !0,
  4925.                 q = !1,
  4926.                 u = {},
  4927.                 v = !0,
  4928.                 w = [],
  4929.                 x = {
  4930.                     string: {
  4931.                         encode: a,
  4932.                         decode: e,
  4933.                         is: function(a) {
  4934.                             return null == a || !L(a) || "string" == typeof a
  4935.                         },
  4936.                         pattern: /[^\/]*/
  4937.                     },
  4938.                     "int": {
  4939.                         encode: a,
  4940.                         decode: function(a) {
  4941.                             return parseInt(a, 10)
  4942.                         },
  4943.                         is: function(a) {
  4944.                             return L(a) && this.decode(a.toString()) === a
  4945.                         },
  4946.                         pattern: /\d+/
  4947.                     },
  4948.                     bool: {
  4949.                         encode: function(a) {
  4950.                             return a ? 1 : 0
  4951.                         },
  4952.                         decode: function(a) {
  4953.                             return 0 !== parseInt(a, 10)
  4954.                         },
  4955.                         is: function(a) {
  4956.                             return a === !0 || a === !1
  4957.                         },
  4958.                         pattern: /0|1/
  4959.                     },
  4960.                     date: {
  4961.                         encode: function(a) {
  4962.                             return this.is(a) ? [a.getFullYear(), ("0" + (a.getMonth() + 1)).slice(-2), ("0" + a.getDate()).slice(-2)].join("-") : c
  4963.                         },
  4964.                         decode: function(a) {
  4965.                             if (this.is(a)) return a;
  4966.                             var b = this.capture.exec(a);
  4967.                             return b ? new Date(b[1], b[2] - 1, b[3]) : c
  4968.                         },
  4969.                         is: function(a) {
  4970.                             return a instanceof Date && !isNaN(a.valueOf())
  4971.                         },
  4972.                         equals: function(a, b) {
  4973.                             return this.is(a) && this.is(b) && a.toISOString() === b.toISOString()
  4974.                         },
  4975.                         pattern: /[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,
  4976.                         capture: /([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/
  4977.                     },
  4978.                     json: {
  4979.                         encode: b.toJson,
  4980.                         decode: b.fromJson,
  4981.                         is: b.isObject,
  4982.                         equals: b.equals,
  4983.                         pattern: /[^\/]*/
  4984.                     },
  4985.                     any: {
  4986.                         encode: b.identity,
  4987.                         decode: b.identity,
  4988.                         equals: b.equals,
  4989.                         pattern: /.*/
  4990.                     }
  4991.                 };
  4992.             t.$$getDefaultValue = function(a) {
  4993.                 if (!i(a.value)) return a.value;
  4994.                 if (!l) throw new Error("Injectable functions cannot be called at configuration time");
  4995.                 return l.invoke(a.value)
  4996.             }, this.caseInsensitive = function(a) {
  4997.                 return L(a) && (m = a), m
  4998.             }, this.strictMode = function(a) {
  4999.                 return L(a) && (p = a), p
  5000.             }, this.defaultSquashPolicy = function(a) {
  5001.                 if (!L(a)) return q;
  5002.                 if (a !== !0 && a !== !1 && !N(a)) throw new Error("Invalid squash policy: " + a + ". Valid policies: false, true, arbitrary-string");
  5003.                 return q = a, a
  5004.             }, this.compile = function(a, b) {
  5005.                 return new r(a, R(f(), b))
  5006.             }, this.isMatcher = function(a) {
  5007.                 if (!O(a)) return !1;
  5008.                 var b = !0;
  5009.                 return Q(r.prototype, function(c, d) {
  5010.                     M(c) && (b = b && L(a[d]) && M(a[d]))
  5011.                 }), b
  5012.             }, this.type = function(a, b, c) {
  5013.                 if (!L(b)) return u[a];
  5014.                 if (u.hasOwnProperty(a)) throw new Error("A type named '" + a + "' has already been defined.");
  5015.                 return u[a] = new s(R({
  5016.                     name: a
  5017.                 }, b)), c && (w.push({
  5018.                     name: a,
  5019.                     def: c
  5020.                 }), v || j()), this
  5021.             }, Q(x, function(a, b) {
  5022.                 u[b] = new s(R({
  5023.                     name: b
  5024.                 }, a))
  5025.             }), u = d(u, {}), this.$get = ["$injector", function(a) {
  5026.                 return l = a, v = !1, j(), Q(x, function(a, b) {
  5027.                     u[b] || (u[b] = new s(a))
  5028.                 }), this
  5029.             }], this.Param = function(a, d, e, f) {
  5030.                 function j(a) {
  5031.                     var b = O(a) ? g(a) : [],
  5032.                         c = -1 === h(b, "value") && -1 === h(b, "type") && -1 === h(b, "squash") && -1 === h(b, "array");
  5033.                     return c && (a = {
  5034.                         value: a
  5035.                     }), a.$$fn = i(a.value) ? a.value : function() {
  5036.                         return a.value
  5037.                     }, a
  5038.                 }
  5039.  
  5040.                 function k(c, d, e) {
  5041.                     if (c.type && d) throw new Error("Param '" + a + "' has two type configurations.");
  5042.                     return d ? d : c.type ? b.isString(c.type) ? u[c.type] : c.type instanceof s ? c.type : new s(c.type) : "config" === e ? u.any : u.string
  5043.                 }
  5044.  
  5045.                 function m() {
  5046.                     var b = {
  5047.                             array: "search" === f ? "auto" : !1
  5048.                         },
  5049.                         c = a.match(/\[\]$/) ? {
  5050.                             array: !0
  5051.                         } : {};
  5052.                     return R(b, c, e).array
  5053.                 }
  5054.  
  5055.                 function p(a, b) {
  5056.                     var c = a.squash;
  5057.                     if (!b || c === !1) return !1;
  5058.                     if (!L(c) || null == c) return q;
  5059.                     if (c === !0 || N(c)) return c;
  5060.                     throw new Error("Invalid squash policy: '" + c + "'. Valid policies: false, true, or arbitrary string")
  5061.                 }
  5062.  
  5063.                 function r(a, b, d, e) {
  5064.                     var f, g, i = [{
  5065.                         from: "",
  5066.                         to: d || b ? c : ""
  5067.                     }, {
  5068.                         from: null,
  5069.                         to: d || b ? c : ""
  5070.                     }];
  5071.                     return f = P(a.replace) ? a.replace : [], N(e) && f.push({
  5072.                         from: e,
  5073.                         to: c
  5074.                     }), g = o(f, function(a) {
  5075.                         return a.from
  5076.                     }), n(i, function(a) {
  5077.                         return -1 === h(g, a.from)
  5078.                     }).concat(f)
  5079.                 }
  5080.  
  5081.                 function t() {
  5082.                     if (!l) throw new Error("Injectable functions cannot be called at configuration time");
  5083.                     var a = l.invoke(e.$$fn);
  5084.                     if (null !== a && a !== c && !x.type.is(a)) throw new Error("Default value (" + a + ") for parameter '" + x.id + "' is not an instance of Type (" + x.type.name + ")");
  5085.                     return a
  5086.                 }
  5087.  
  5088.                 function v(a) {
  5089.                     function b(a) {
  5090.                         return function(b) {
  5091.                             return b.from === a
  5092.                         }
  5093.                     }
  5094.  
  5095.                     function c(a) {
  5096.                         var c = o(n(x.replace, b(a)), function(a) {
  5097.                             return a.to
  5098.                         });
  5099.                         return c.length ? c[0] : a
  5100.                     }
  5101.                     return a = c(a), L(a) ? x.type.$normalize(a) : t()
  5102.                 }
  5103.  
  5104.                 function w() {
  5105.                     return "{Param:" + a + " " + d + " squash: '" + A + "' optional: " + z + "}"
  5106.                 }
  5107.                 var x = this;
  5108.                 e = j(e), d = k(e, d, f);
  5109.                 var y = m();
  5110.                 d = y ? d.$asArray(y, "search" === f) : d, "string" !== d.name || y || "path" !== f || e.value !== c || (e.value = "");
  5111.                 var z = e.value !== c,
  5112.                     A = p(e, z),
  5113.                     B = r(e, y, z, A);
  5114.                 R(this, {
  5115.                     id: a,
  5116.                     type: d,
  5117.                     location: f,
  5118.                     array: y,
  5119.                     squash: A,
  5120.                     replace: B,
  5121.                     isOptional: z,
  5122.                     value: v,
  5123.                     dynamic: c,
  5124.                     config: e,
  5125.                     toString: w
  5126.                 })
  5127.             }, k.prototype = {
  5128.                 $$new: function() {
  5129.                     return d(this, R(new k, {
  5130.                         $$parent: this
  5131.                     }))
  5132.                 },
  5133.                 $$keys: function() {
  5134.                     for (var a = [], b = [], c = this, d = g(k.prototype); c;) b.push(c), c = c.$$parent;
  5135.                     return b.reverse(), Q(b, function(b) {
  5136.                         Q(g(b), function(b) {
  5137.                             -1 === h(a, b) && -1 === h(d, b) && a.push(b)
  5138.                         })
  5139.                     }), a
  5140.                 },
  5141.                 $$values: function(a) {
  5142.                     var b = {},
  5143.                         c = this;
  5144.                     return Q(c.$$keys(), function(d) {
  5145.                         b[d] = c[d].value(a && a[d])
  5146.                     }), b
  5147.                 },
  5148.                 $$equals: function(a, b) {
  5149.                     var c = !0,
  5150.                         d = this;
  5151.                     return Q(d.$$keys(), function(e) {
  5152.                         var f = a && a[e],
  5153.                             g = b && b[e];
  5154.                         d[e].type.equals(f, g) || (c = !1)
  5155.                     }), c
  5156.                 },
  5157.                 $$validates: function(a) {
  5158.                     var d, e, f, g, h, i = this.$$keys();
  5159.                     for (d = 0; d < i.length && (e = this[i[d]], f = a[i[d]], f !== c && null !== f || !e.isOptional); d++) {
  5160.                         if (g = e.type.$normalize(f), !e.type.is(g)) return !1;
  5161.                         if (h = e.type.encode(g), b.isString(h) && !e.type.pattern.exec(h)) return !1
  5162.                     }
  5163.                     return !0
  5164.                 },
  5165.                 $$parent: c
  5166.             }, this.ParamSet = k
  5167.         }
  5168.  
  5169.         function u(a, d) {
  5170.             function e(a) {
  5171.                 var b = /^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(a.source);
  5172.                 return null != b ? b[1].replace(/\\(.)/g, "$1") : ""
  5173.             }
  5174.  
  5175.             function f(a, b) {
  5176.                 return a.replace(/\$(\$|\d{1,2})/, function(a, c) {
  5177.                     return b["$" === c ? 0 : Number(c)]
  5178.                 })
  5179.             }
  5180.  
  5181.             function g(a, b, c) {
  5182.                 if (!c) return !1;
  5183.                 var d = a.invoke(b, b, {
  5184.                     $match: c
  5185.                 });
  5186.                 return L(d) ? d : !0
  5187.             }
  5188.  
  5189.             function h(d, e, f, g, h) {
  5190.                 function m(a, b, c) {
  5191.                     return "/" === q ? a : b ? q.slice(0, -1) + a : c ? q.slice(1) + a : a
  5192.                 }
  5193.  
  5194.                 function n(a) {
  5195.                     function b(a) {
  5196.                         var b = a(f, d);
  5197.                         return b ? (N(b) && d.replace().url(b), !0) : !1
  5198.                     }
  5199.                     if (!a || !a.defaultPrevented) {
  5200.                         p && d.url() === p;
  5201.                         p = c;
  5202.                         var e, g = j.length;
  5203.                         for (e = 0; g > e; e++)
  5204.                             if (b(j[e])) return;
  5205.                         k && b(k)
  5206.                     }
  5207.                 }
  5208.  
  5209.                 function o() {
  5210.                     return i = i || e.$on("$locationChangeSuccess", n)
  5211.                 }
  5212.                 var p, q = g.baseHref(),
  5213.                     r = d.url();
  5214.                 return l || o(), {
  5215.                     sync: function() {
  5216.                         n()
  5217.                     },
  5218.                     listen: function() {
  5219.                         return o()
  5220.                     },
  5221.                     update: function(a) {
  5222.                         return a ? void(r = d.url()) : void(d.url() !== r && (d.url(r), d.replace()))
  5223.                     },
  5224.                     push: function(a, b, e) {
  5225.                         var f = a.format(b || {});
  5226.                         null !== f && b && b["#"] && (f += "#" + b["#"]), d.url(f), p = e && e.$$avoidResync ? d.url() : c, e && e.replace && d.replace()
  5227.                     },
  5228.                     href: function(c, e, f) {
  5229.                         if (!c.validates(e)) return null;
  5230.                         var g = a.html5Mode();
  5231.                         b.isObject(g) && (g = g.enabled), g = g && h.history;
  5232.                         var i = c.format(e);
  5233.                         if (f = f || {}, g || null === i || (i = "#" + a.hashPrefix() + i), null !== i && e && e["#"] && (i += "#" + e["#"]), i = m(i, g, f.absolute), !f.absolute || !i) return i;
  5234.                         var j = !g && i ? "/" : "",
  5235.                             k = d.port();
  5236.                         return k = 80 === k || 443 === k ? "" : ":" + k, [d.protocol(), "://", d.host(), k, j, i].join("")
  5237.                     }
  5238.                 }
  5239.             }
  5240.             var i, j = [],
  5241.                 k = null,
  5242.                 l = !1;
  5243.             this.rule = function(a) {
  5244.                 if (!M(a)) throw new Error("'rule' must be a function");
  5245.                 return j.push(a), this
  5246.             }, this.otherwise = function(a) {
  5247.                 if (N(a)) {
  5248.                     var b = a;
  5249.                     a = function() {
  5250.                         return b
  5251.                     }
  5252.                 } else if (!M(a)) throw new Error("'rule' must be a function");
  5253.                 return k = a, this
  5254.             }, this.when = function(a, b) {
  5255.                 var c, h = N(b);
  5256.                 if (N(a) && (a = d.compile(a)), !h && !M(b) && !P(b)) throw new Error("invalid 'handler' in when()");
  5257.                 var i = {
  5258.                         matcher: function(a, b) {
  5259.                             return h && (c = d.compile(b), b = ["$match", function(a) {
  5260.                                 return c.format(a)
  5261.                             }]), R(function(c, d) {
  5262.                                 return g(c, b, a.exec(d.path(), d.search()))
  5263.                             }, {
  5264.                                 prefix: N(a.prefix) ? a.prefix : ""
  5265.                             })
  5266.                         },
  5267.                         regex: function(a, b) {
  5268.                             if (a.global || a.sticky) throw new Error("when() RegExp must not be global or sticky");
  5269.                             return h && (c = b, b = ["$match", function(a) {
  5270.                                 return f(c, a)
  5271.                             }]), R(function(c, d) {
  5272.                                 return g(c, b, a.exec(d.path()))
  5273.                             }, {
  5274.                                 prefix: e(a)
  5275.                             })
  5276.                         }
  5277.                     },
  5278.                     j = {
  5279.                         matcher: d.isMatcher(a),
  5280.                         regex: a instanceof RegExp
  5281.                     };
  5282.                 for (var k in j)
  5283.                     if (j[k]) return this.rule(i[k](a, b));
  5284.                 throw new Error("invalid 'what' in when()")
  5285.             }, this.deferIntercept = function(a) {
  5286.                 a === c && (a = !0), l = a
  5287.             }, this.$get = h, h.$inject = ["$location", "$rootScope", "$injector", "$browser", "$sniffer"]
  5288.         }
  5289.  
  5290.         function v(a, e) {
  5291.             function f(a) {
  5292.                 return 0 === a.indexOf(".") || 0 === a.indexOf("^")
  5293.             }
  5294.  
  5295.             function m(a, b) {
  5296.                 if (!a) return c;
  5297.                 var d = N(a),
  5298.                     e = d ? a : a.name,
  5299.                     g = f(e);
  5300.                 if (g) {
  5301.                     if (!b) throw new Error("No reference point given for path '" + e + "'");
  5302.                     b = m(b);
  5303.                     for (var h = e.split("."), i = 0, j = h.length, k = b; j > i; i++)
  5304.                         if ("" !== h[i] || 0 !== i) {
  5305.                             if ("^" !== h[i]) break;
  5306.                             if (!k.parent) throw new Error("Path '" + e + "' not valid for state '" + b.name + "'");
  5307.                             k = k.parent
  5308.                         } else k = b;
  5309.                     h = h.slice(i).join("."), e = k.name + (k.name && h ? "." : "") + h
  5310.                 }
  5311.                 var l = z[e];
  5312.                 return !l || !d && (d || l !== a && l.self !== a) ? c : l
  5313.             }
  5314.  
  5315.             function n(a, b) {
  5316.                 A[a] || (A[a] = []), A[a].push(b)
  5317.             }
  5318.  
  5319.             function p(a) {
  5320.                 for (var b = A[a] || []; b.length;) q(b.shift())
  5321.             }
  5322.  
  5323.             function q(b) {
  5324.                 b = d(b, {
  5325.                     self: b,
  5326.                     resolve: b.resolve || {},
  5327.                     toString: function() {
  5328.                         return this.name
  5329.                     }
  5330.                 });
  5331.                 var c = b.name;
  5332.                 if (!N(c) || c.indexOf("@") >= 0) throw new Error("State must have a valid name");
  5333.                 if (z.hasOwnProperty(c)) throw new Error("State '" + c + "' is already defined");
  5334.                 var e = -1 !== c.indexOf(".") ? c.substring(0, c.lastIndexOf(".")) : N(b.parent) ? b.parent : O(b.parent) && N(b.parent.name) ? b.parent.name : "";
  5335.                 if (e && !z[e]) return n(e, b.self);
  5336.                 for (var f in C) M(C[f]) && (b[f] = C[f](b, C.$delegates[f]));
  5337.                 return z[c] = b, !b[B] && b.url && a.when(b.url, ["$match", "$stateParams", function(a, c) {
  5338.                     y.$current.navigable == b && j(a, c) || y.transitionTo(b, a, {
  5339.                         inherit: !0,
  5340.                         location: !1
  5341.                     })
  5342.                 }]), p(c), b
  5343.             }
  5344.  
  5345.             function r(a) {
  5346.                 return a.indexOf("*") > -1
  5347.             }
  5348.  
  5349.             function s(a) {
  5350.                 for (var b = a.split("."), c = y.$current.name.split("."), d = 0, e = b.length; e > d; d++) "*" === b[d] && (c[d] = "*");
  5351.                 return "**" === b[0] && (c = c.slice(h(c, b[1])), c.unshift("**")), "**" === b[b.length - 1] && (c.splice(h(c, b[b.length - 2]) + 1, Number.MAX_VALUE), c.push("**")), b.length != c.length ? !1 : c.join("") === b.join("")
  5352.             }
  5353.  
  5354.             function t(a, b) {
  5355.                 return N(a) && !L(b) ? C[a] : M(b) && N(a) ? (C[a] && !C.$delegates[a] && (C.$delegates[a] = C[a]), C[a] = b, this) : this
  5356.             }
  5357.  
  5358.             function u(a, b) {
  5359.                 return O(a) ? b = a : b.name = a, q(b), this
  5360.             }
  5361.  
  5362.             function v(a, e, f, h, l, n, p, q, t) {
  5363.                 function u(b, c, d, f) {
  5364.                     var g = a.$broadcast("$stateNotFound", b, c, d);
  5365.                     if (g.defaultPrevented) return p.update(), D;
  5366.                     if (!g.retry) return null;
  5367.                     if (f.$retry) return p.update(), E;
  5368.                     var h = y.transition = e.when(g.retry);
  5369.                     return h.then(function() {
  5370.                         return h !== y.transition ? A : (b.options.$retry = !0, y.transitionTo(b.to, b.toParams, b.options))
  5371.                     }, function() {
  5372.                         return D
  5373.                     }), p.update(), h
  5374.                 }
  5375.  
  5376.                 function v(a, c, d, g, i, j) {
  5377.                     function m() {
  5378.                         var c = [];
  5379.                         return Q(a.views, function(d, e) {
  5380.                             var g = d.resolve && d.resolve !== a.resolve ? d.resolve : {};
  5381.                             g.$template = [function() {
  5382.                                 return f.load(e, {
  5383.                                     view: d,
  5384.                                     locals: i.globals,
  5385.                                     params: n,
  5386.                                     notify: j.notify
  5387.                                 }) || ""
  5388.                             }], c.push(l.resolve(g, i.globals, i.resolve, a).then(function(c) {
  5389.                                 if (M(d.controllerProvider) || P(d.controllerProvider)) {
  5390.                                     var f = b.extend({}, g, i.globals);
  5391.                                     c.$$controller = h.invoke(d.controllerProvider, null, f)
  5392.                                 } else c.$$controller = d.controller;
  5393.                                 c.$$state = a, c.$$controllerAs = d.controllerAs, i[e] = c
  5394.                             }))
  5395.                         }), e.all(c).then(function() {
  5396.                             return i.globals
  5397.                         })
  5398.                     }
  5399.                     var n = d ? c : k(a.params.$$keys(), c),
  5400.                         o = {
  5401.                             $stateParams: n
  5402.                         };
  5403.                     i.resolve = l.resolve(a.resolve, o, i.resolve, a);
  5404.                     var p = [i.resolve.then(function(a) {
  5405.                         i.globals = a
  5406.                     })];
  5407.                     return g && p.push(g), e.all(p).then(m).then(function(a) {
  5408.                         return i
  5409.                     })
  5410.                 }
  5411.                 var A = e.reject(new Error("transition superseded")),
  5412.                     C = e.reject(new Error("transition prevented")),
  5413.                     D = e.reject(new Error("transition aborted")),
  5414.                     E = e.reject(new Error("transition failed"));
  5415.                 return x.locals = {
  5416.                     resolve: null,
  5417.                     globals: {
  5418.                         $stateParams: {}
  5419.                     }
  5420.                 }, y = {
  5421.                     params: {},
  5422.                     current: x.self,
  5423.                     $current: x,
  5424.                     transition: null
  5425.                 }, y.reload = function(a) {
  5426.                     return y.transitionTo(y.current, n, {
  5427.                         reload: a || !0,
  5428.                         inherit: !1,
  5429.                         notify: !0
  5430.                     })
  5431.                 }, y.go = function(a, b, c) {
  5432.                     return y.transitionTo(a, b, R({
  5433.                         inherit: !0,
  5434.                         relative: y.$current
  5435.                     }, c))
  5436.                 }, y.transitionTo = function(b, c, f) {
  5437.                     c = c || {}, f = R({
  5438.                         location: !0,
  5439.                         inherit: !1,
  5440.                         relative: null,
  5441.                         notify: !0,
  5442.                         reload: !1,
  5443.                         $retry: !1
  5444.                     }, f || {});
  5445.                     var g, j = y.$current,
  5446.                         l = y.params,
  5447.                         o = j.path,
  5448.                         q = m(b, f.relative),
  5449.                         r = c["#"];
  5450.                     if (!L(q)) {
  5451.                         var s = {
  5452.                                 to: b,
  5453.                                 toParams: c,
  5454.                                 options: f
  5455.                             },
  5456.                             t = u(s, j.self, l, f);
  5457.                         if (t) return t;
  5458.                         if (b = s.to, c = s.toParams, f = s.options, q = m(b, f.relative), !L(q)) {
  5459.                             if (!f.relative) throw new Error("No such state '" + b + "'");
  5460.                             throw new Error("Could not resolve '" + b + "' from state '" + f.relative + "'")
  5461.                         }
  5462.                     }
  5463.                     if (q[B]) throw new Error("Cannot transition to abstract state '" + b + "'");
  5464.                     if (f.inherit && (c = i(n, c || {}, y.$current, q)), !q.params.$$validates(c)) return E;
  5465.                     c = q.params.$$values(c), b = q;
  5466.                     var z = b.path,
  5467.                         D = 0,
  5468.                         F = z[D],
  5469.                         G = x.locals,
  5470.                         H = [];
  5471.                     if (f.reload) {
  5472.                         if (N(f.reload) || O(f.reload)) {
  5473.                             if (O(f.reload) && !f.reload.name) throw new Error("Invalid reload state object");
  5474.                             var I = f.reload === !0 ? o[0] : m(f.reload);
  5475.                             if (f.reload && !I) throw new Error("No such reload state '" + (N(f.reload) ? f.reload : f.reload.name) + "'");
  5476.                             for (; F && F === o[D] && F !== I;) G = H[D] = F.locals, D++, F = z[D]
  5477.                         }
  5478.                     } else
  5479.                         for (; F && F === o[D] && F.ownParams.$$equals(c, l);) G = H[D] = F.locals, D++, F = z[D];
  5480.                     if (w(b, c, j, l, G, f)) return r && (c["#"] = r), y.params = c, S(y.params, n), S(k(b.params.$$keys(), n), b.locals.globals.$stateParams), f.location && b.navigable && b.navigable.url && (p.push(b.navigable.url, c, {
  5481.                         $$avoidResync: !0,
  5482.                         replace: "replace" === f.location
  5483.                     }), p.update(!0)), y.transition = null, e.when(y.current);
  5484.                     if (c = k(b.params.$$keys(), c || {}), r && (c["#"] = r), f.notify && a.$broadcast("$stateChangeStart", b.self, c, j.self, l, f).defaultPrevented) return a.$broadcast("$stateChangeCancel", b.self, c, j.self, l), null == y.transition && p.update(), C;
  5485.                     for (var J = e.when(G), K = D; K < z.length; K++, F = z[K]) G = H[K] = d(G), J = v(F, c, F === b, J, G, f);
  5486.                     var M = y.transition = J.then(function() {
  5487.                         var d, e, g;
  5488.                         if (y.transition !== M) return A;
  5489.                         for (d = o.length - 1; d >= D; d--) g = o[d], g.self.onExit && h.invoke(g.self.onExit, g.self, g.locals.globals), g.locals = null;
  5490.                         for (d = D; d < z.length; d++) e = z[d], e.locals = H[d], e.self.onEnter && h.invoke(e.self.onEnter, e.self, e.locals.globals);
  5491.                         return y.transition !== M ? A : (y.$current = b, y.current = b.self, y.params = c, S(y.params, n), y.transition = null, f.location && b.navigable && p.push(b.navigable.url, b.navigable.locals.globals.$stateParams, {
  5492.                             $$avoidResync: !0,
  5493.                             replace: "replace" === f.location
  5494.                         }), f.notify && a.$broadcast("$stateChangeSuccess", b.self, c, j.self, l), p.update(!0), y.current)
  5495.                     }, function(d) {
  5496.                         return y.transition !== M ? A : (y.transition = null, g = a.$broadcast("$stateChangeError", b.self, c, j.self, l, d), g.defaultPrevented || p.update(), e.reject(d))
  5497.                     });
  5498.                     return M
  5499.                 }, y.is = function(a, b, d) {
  5500.                     d = R({
  5501.                         relative: y.$current
  5502.                     }, d || {});
  5503.                     var e = m(a, d.relative);
  5504.                     return L(e) ? y.$current !== e ? !1 : b ? j(e.params.$$values(b), n) : !0 : c
  5505.                 }, y.includes = function(a, b, d) {
  5506.                     if (d = R({
  5507.                             relative: y.$current
  5508.                         }, d || {}), N(a) && r(a)) {
  5509.                         if (!s(a)) return !1;
  5510.                         a = y.$current.name
  5511.                     }
  5512.                     var e = m(a, d.relative);
  5513.                     return L(e) ? L(y.$current.includes[e.name]) ? b ? j(e.params.$$values(b), n, g(b)) : !0 : !1 : c
  5514.                 }, y.href = function(a, b, d) {
  5515.                     d = R({
  5516.                         lossy: !0,
  5517.                         inherit: !0,
  5518.                         absolute: !1,
  5519.                         relative: y.$current
  5520.                     }, d || {});
  5521.                     var e = m(a, d.relative);
  5522.                     if (!L(e)) return null;
  5523.                     d.inherit && (b = i(n, b || {}, y.$current, e));
  5524.                     var f = e && d.lossy ? e.navigable : e;
  5525.                     return f && f.url !== c && null !== f.url ? p.href(f.url, k(e.params.$$keys().concat("#"), b || {}), {
  5526.                         absolute: d.absolute
  5527.                     }) : null
  5528.                 }, y.get = function(a, b) {
  5529.                     if (0 === arguments.length) return o(g(z), function(a) {
  5530.                         return z[a].self
  5531.                     });
  5532.                     var c = m(a, b || y.$current);
  5533.                     return c && c.self ? c.self : null
  5534.                 }, y
  5535.             }
  5536.  
  5537.             function w(a, b, c, d, e, f) {
  5538.                 function g(a, b, c) {
  5539.                     function d(b) {
  5540.                         return "search" != a.params[b].location
  5541.                     }
  5542.                     var e = a.params.$$keys().filter(d),
  5543.                         f = l.apply({}, [a.params].concat(e)),
  5544.                         g = new U.ParamSet(f);
  5545.                     return g.$$equals(b, c)
  5546.                 }
  5547.                 return !f.reload && a === c && (e === c.locals || a.self.reloadOnSearch === !1 && g(c, d, b)) ? !0 : void 0
  5548.             }
  5549.             var x, y, z = {},
  5550.                 A = {},
  5551.                 B = "abstract",
  5552.                 C = {
  5553.                     parent: function(a) {
  5554.                         if (L(a.parent) && a.parent) return m(a.parent);
  5555.                         var b = /^(.+)\.[^.]+$/.exec(a.name);
  5556.                         return b ? m(b[1]) : x
  5557.                     },
  5558.                     data: function(a) {
  5559.                         return a.parent && a.parent.data && (a.data = a.self.data = d(a.parent.data, a.data)), a.data
  5560.                     },
  5561.                     url: function(a) {
  5562.                         var b = a.url,
  5563.                             c = {
  5564.                                 params: a.params || {}
  5565.                             };
  5566.                         if (N(b)) return "^" == b.charAt(0) ? e.compile(b.substring(1), c) : (a.parent.navigable || x).url.concat(b, c);
  5567.                         if (!b || e.isMatcher(b)) return b;
  5568.                         throw new Error("Invalid url '" + b + "' in state '" + a + "'")
  5569.                     },
  5570.                     navigable: function(a) {
  5571.                         return a.url ? a : a.parent ? a.parent.navigable : null
  5572.                     },
  5573.                     ownParams: function(a) {
  5574.                         var b = a.url && a.url.params || new U.ParamSet;
  5575.                         return Q(a.params || {}, function(a, c) {
  5576.                             b[c] || (b[c] = new U.Param(c, null, a, "config"))
  5577.                         }), b
  5578.                     },
  5579.                     params: function(a) {
  5580.                         var b = l(a.ownParams, a.ownParams.$$keys());
  5581.                         return a.parent && a.parent.params ? R(a.parent.params.$$new(), b) : new U.ParamSet
  5582.                     },
  5583.                     views: function(a) {
  5584.                         var b = {};
  5585.                         return Q(L(a.views) ? a.views : {
  5586.                             "": a
  5587.                         }, function(c, d) {
  5588.                             d.indexOf("@") < 0 && (d += "@" + a.parent.name), b[d] = c
  5589.                         }), b
  5590.                     },
  5591.                     path: function(a) {
  5592.                         return a.parent ? a.parent.path.concat(a) : []
  5593.                     },
  5594.                     includes: function(a) {
  5595.                         var b = a.parent ? R({}, a.parent.includes) : {};
  5596.                         return b[a.name] = !0, b
  5597.                     },
  5598.                     $delegates: {}
  5599.                 };
  5600.             x = q({
  5601.                 name: "",
  5602.                 url: "^",
  5603.                 views: null,
  5604.                 "abstract": !0
  5605.             }), x.navigable = null, this.decorator = t, this.state = u, this.$get = v, v.$inject = ["$rootScope", "$q", "$view", "$injector", "$resolve", "$stateParams", "$urlRouter", "$location", "$urlMatcherFactory"]
  5606.         }
  5607.  
  5608.         function w() {
  5609.             function a(a, b) {
  5610.                 return {
  5611.                     load: function(a, c) {
  5612.                         var d, e = {
  5613.                             template: null,
  5614.                             controller: null,
  5615.                             view: null,
  5616.                             locals: null,
  5617.                             notify: !0,
  5618.                             async: !0,
  5619.                             params: {}
  5620.                         };
  5621.                         return c = R(e, c), c.view && (d = b.fromConfig(c.view, c.params, c.locals)), d
  5622.                     }
  5623.                 }
  5624.             }
  5625.             this.$get = a, a.$inject = ["$rootScope", "$templateFactory"]
  5626.         }
  5627.  
  5628.         function x() {
  5629.             var a = !1;
  5630.             this.useAnchorScroll = function() {
  5631.                 a = !0
  5632.             }, this.$get = ["$anchorScroll", "$timeout", function(b, c) {
  5633.                 return a ? b : function(a) {
  5634.                     return c(function() {
  5635.                         a[0].scrollIntoView()
  5636.                     }, 0, !1)
  5637.                 }
  5638.             }]
  5639.         }
  5640.  
  5641.         function y(a, c, d, e) {
  5642.             function f() {
  5643.                 return c.has ? function(a) {
  5644.                     return c.has(a) ? c.get(a) : null
  5645.                 } : function(a) {
  5646.                     try {
  5647.                         return c.get(a)
  5648.                     } catch (b) {
  5649.                         return null
  5650.                     }
  5651.                 }
  5652.             }
  5653.  
  5654.             function g(a, c) {
  5655.                 function d(a) {
  5656.                     return 1 === V && W >= 4 ? !!j.enabled(a) : 1 === V && W >= 2 ? !!j.enabled() : !!i
  5657.                 }
  5658.                 var e = {
  5659.                     enter: function(a, b, c) {
  5660.                         b.after(a), c()
  5661.                     },
  5662.                     leave: function(a, b) {
  5663.                         a.remove(), b()
  5664.                     }
  5665.                 };
  5666.                 if (a.noanimation) return e;
  5667.                 if (j) return {
  5668.                     enter: function(a, c, f) {
  5669.                         d(a) ? b.version.minor > 2 ? j.enter(a, null, c).then(f) : j.enter(a, null, c, f) : e.enter(a, c, f)
  5670.                     },
  5671.                     leave: function(a, c) {
  5672.                         d(a) ? b.version.minor > 2 ? j.leave(a).then(c) : j.leave(a, c) : e.leave(a, c)
  5673.                     }
  5674.                 };
  5675.                 if (i) {
  5676.                     var f = i && i(c, a);
  5677.                     return {
  5678.                         enter: function(a, b, c) {
  5679.                             f.enter(a, null, b), c()
  5680.                         },
  5681.                         leave: function(a, b) {
  5682.                             f.leave(a), b()
  5683.                         }
  5684.                     }
  5685.                 }
  5686.                 return e
  5687.             }
  5688.             var h = f(),
  5689.                 i = h("$animator"),
  5690.                 j = h("$animate"),
  5691.                 k = {
  5692.                     restrict: "ECA",
  5693.                     terminal: !0,
  5694.                     priority: 400,
  5695.                     transclude: "element",
  5696.                     compile: function(c, f, h) {
  5697.                         return function(c, f, i) {
  5698.                             function j() {
  5699.                                 function a() {
  5700.                                     b && b.remove(), c && c.$destroy()
  5701.                                 }
  5702.                                 var b = l,
  5703.                                     c = n;
  5704.                                 c && (c._willBeDestroyed = !0), m ? (r.leave(m, function() {
  5705.                                     a(), l = null
  5706.                                 }), l = m) : (a(), l = null), m = null, n = null
  5707.                             }
  5708.  
  5709.                             function k(g) {
  5710.                                 var k, l = A(c, i, f, e),
  5711.                                     s = l && a.$current && a.$current.locals[l];
  5712.                                 if ((g || s !== o) && !c._willBeDestroyed) {
  5713.                                     k = c.$new(), o = a.$current.locals[l], k.$emit("$viewContentLoading", l);
  5714.                                     var t = h(k, function(a) {
  5715.                                         r.enter(a, f, function() {
  5716.                                             n && n.$emit("$viewContentAnimationEnded"), (b.isDefined(q) && !q || c.$eval(q)) && d(a)
  5717.                                         }), j()
  5718.                                     });
  5719.                                     m = t, n = k, n.$emit("$viewContentLoaded", l), n.$eval(p)
  5720.                                 }
  5721.                             }
  5722.                             var l, m, n, o, p = i.onload || "",
  5723.                                 q = i.autoscroll,
  5724.                                 r = g(i, c);
  5725.                             c.$on("$stateChangeSuccess", function() {
  5726.                                 k(!1)
  5727.                             }), k(!0)
  5728.                         }
  5729.                     }
  5730.                 };
  5731.             return k
  5732.         }
  5733.  
  5734.         function z(a, b, c, d) {
  5735.             return {
  5736.                 restrict: "ECA",
  5737.                 priority: -400,
  5738.                 compile: function(e) {
  5739.                     var f = e.html();
  5740.                     return function(e, g, h) {
  5741.                         var i = c.$current,
  5742.                             j = A(e, h, g, d),
  5743.                             k = i && i.locals[j];
  5744.                         if (k) {
  5745.                             g.data("$uiView", {
  5746.                                 name: j,
  5747.                                 state: k.$$state
  5748.                             }), g.html(k.$template ? k.$template : f);
  5749.                             var l = a(g.contents());
  5750.                             if (k.$$controller) {
  5751.                                 k.$scope = e, k.$element = g;
  5752.                                 var m = b(k.$$controller, k);
  5753.                                 k.$$controllerAs && (e[k.$$controllerAs] = m), g.data("$ngControllerController", m), g.children().data("$ngControllerController", m)
  5754.                             }
  5755.                             l(e)
  5756.                         }
  5757.                     }
  5758.                 }
  5759.             }
  5760.         }
  5761.  
  5762.         function A(a, b, c, d) {
  5763.             var e = d(b.uiView || b.name || "")(a),
  5764.                 f = c.inheritedData("$uiView");
  5765.             return e.indexOf("@") >= 0 ? e : e + "@" + (f ? f.state.name : "")
  5766.         }
  5767.  
  5768.         function B(a, b) {
  5769.             var c, d = a.match(/^\s*({[^}]*})\s*$/);
  5770.             if (d && (a = b + "(" + d[1] + ")"), c = a.replace(/\n/g, " ").match(/^([^(]+?)\s*(\((.*)\))?$/), !c || 4 !== c.length) throw new Error("Invalid state ref '" + a + "'");
  5771.             return {
  5772.                 state: c[1],
  5773.                 paramExpr: c[3] || null
  5774.             }
  5775.         }
  5776.  
  5777.         function C(a) {
  5778.             var b = a.parent().inheritedData("$uiView");
  5779.             return b && b.state && b.state.name ? b.state : void 0
  5780.         }
  5781.  
  5782.         function D(a) {
  5783.             var b = "[object SVGAnimatedString]" === Object.prototype.toString.call(a.prop("href")),
  5784.                 c = "FORM" === a[0].nodeName;
  5785.             return {
  5786.                 attr: c ? "action" : b ? "xlink:href" : "href",
  5787.                 isAnchor: "A" === a.prop("tagName").toUpperCase(),
  5788.                 clickable: !c
  5789.             }
  5790.         }
  5791.  
  5792.         function E(a, b, c, d, e) {
  5793.             return function(f) {
  5794.                 var g = f.which || f.button,
  5795.                     h = e();
  5796.                 if (!(g > 1 || f.ctrlKey || f.metaKey || f.shiftKey || a.attr("target"))) {
  5797.                     var i = c(function() {
  5798.                         b.go(h.state, h.params, h.options)
  5799.                     });
  5800.                     f.preventDefault();
  5801.                     var j = d.isAnchor && !h.href ? 1 : 0;
  5802.                     f.preventDefault = function() {
  5803.                         j-- <= 0 && c.cancel(i)
  5804.                     }
  5805.                 }
  5806.             }
  5807.         }
  5808.  
  5809.         function F(a, b) {
  5810.             return {
  5811.                 relative: C(a) || b.$current,
  5812.                 inherit: !0
  5813.             }
  5814.         }
  5815.  
  5816.         function G(a, c) {
  5817.             return {
  5818.                 restrict: "A",
  5819.                 require: ["?^uiSrefActive", "?^uiSrefActiveEq"],
  5820.                 link: function(d, e, f, g) {
  5821.                     var h = B(f.uiSref, a.current.name),
  5822.                         i = {
  5823.                             state: h.state,
  5824.                             href: null,
  5825.                             params: null
  5826.                         },
  5827.                         j = D(e),
  5828.                         k = g[1] || g[0];
  5829.                     i.options = R(F(e, a), f.uiSrefOpts ? d.$eval(f.uiSrefOpts) : {});
  5830.                     var l = function(c) {
  5831.                         c && (i.params = b.copy(c)), i.href = a.href(h.state, i.params, i.options), k && k.$$addStateInfo(h.state, i.params), null !== i.href && f.$set(j.attr, i.href)
  5832.                     };
  5833.                     h.paramExpr && (d.$watch(h.paramExpr, function(a) {
  5834.                         a !== i.params && l(a)
  5835.                     }, !0), i.params = b.copy(d.$eval(h.paramExpr))), l(), j.clickable && e.bind("click", E(e, a, c, j, function() {
  5836.                         return i
  5837.                     }))
  5838.                 }
  5839.             }
  5840.         }
  5841.  
  5842.         function H(a, b) {
  5843.             return {
  5844.                 restrict: "A",
  5845.                 require: ["?^uiSrefActive", "?^uiSrefActiveEq"],
  5846.                 link: function(c, d, e, f) {
  5847.                     function g(b) {
  5848.                         l.state = b[0], l.params = b[1], l.options = b[2], l.href = a.href(l.state, l.params, l.options), i && i.$$addStateInfo(l.state, l.params), l.href && e.$set(h.attr, l.href)
  5849.                     }
  5850.                     var h = D(d),
  5851.                         i = f[1] || f[0],
  5852.                         j = [e.uiState, e.uiStateParams || null, e.uiStateOpts || null],
  5853.                         k = "[" + j.map(function(a) {
  5854.                             return a || "null"
  5855.                         }).join(", ") + "]",
  5856.                         l = {
  5857.                             state: null,
  5858.                             params: null,
  5859.                             options: null,
  5860.                             href: null
  5861.                         };
  5862.                     c.$watch(k, g, !0), g(c.$eval(k)), h.clickable && d.bind("click", E(d, a, b, h, function() {
  5863.                         return l
  5864.                     }))
  5865.                 }
  5866.             }
  5867.         }
  5868.  
  5869.         function I(a, b, c) {
  5870.             return {
  5871.                 restrict: "A",
  5872.                 controller: ["$scope", "$element", "$attrs", "$timeout", function(b, d, e, f) {
  5873.                     function g(b, c, e) {
  5874.                         var f = a.get(b, C(d)),
  5875.                             g = h(b, c);
  5876.                         p.push({
  5877.                             state: f || {
  5878.                                 name: b
  5879.                             },
  5880.                             params: c,
  5881.                             hash: g
  5882.                         }), q[g] = e
  5883.                     }
  5884.  
  5885.                     function h(a, c) {
  5886.                         if (!N(a)) throw new Error("state should be a string");
  5887.                         return O(c) ? a + T(c) : (c = b.$eval(c), O(c) ? a + T(c) : a)
  5888.                     }
  5889.  
  5890.                     function i() {
  5891.                         for (var a = 0; a < p.length; a++) l(p[a].state, p[a].params) ? j(d, q[p[a].hash]) : k(d, q[p[a].hash]), m(p[a].state, p[a].params) ? j(d, n) : k(d, n)
  5892.                     }
  5893.  
  5894.                     function j(a, b) {
  5895.                         f(function() {
  5896.                             a.addClass(b)
  5897.                         })
  5898.                     }
  5899.  
  5900.                     function k(a, b) {
  5901.                         a.removeClass(b)
  5902.                     }
  5903.  
  5904.                     function l(b, c) {
  5905.                         return a.includes(b.name, c)
  5906.                     }
  5907.  
  5908.                     function m(b, c) {
  5909.                         return a.is(b.name, c)
  5910.                     }
  5911.                     var n, o, p = [],
  5912.                         q = {};
  5913.                     n = c(e.uiSrefActiveEq || "", !1)(b);
  5914.                     try {
  5915.                         o = b.$eval(e.uiSrefActive)
  5916.                     } catch (r) {}
  5917.                     o = o || c(e.uiSrefActive || "", !1)(b), O(o) && Q(o, function(c, d) {
  5918.                         if (N(c)) {
  5919.                             var e = B(c, a.current.name);
  5920.                             g(e.state, b.$eval(e.paramExpr), d)
  5921.                         }
  5922.                     }), this.$$addStateInfo = function(a, b) {
  5923.                         O(o) && p.length > 0 || (g(a, b, o), i())
  5924.                     }, b.$on("$stateChangeSuccess", i), i()
  5925.                 }]
  5926.             }
  5927.         }
  5928.  
  5929.         function J(a) {
  5930.             var b = function(b, c) {
  5931.                 return a.is(b, c)
  5932.             };
  5933.             return b.$stateful = !0, b
  5934.         }
  5935.  
  5936.         function K(a) {
  5937.             var b = function(b, c, d) {
  5938.                 return a.includes(b, c, d)
  5939.             };
  5940.             return b.$stateful = !0, b
  5941.         }
  5942.         var L = b.isDefined,
  5943.             M = b.isFunction,
  5944.             N = b.isString,
  5945.             O = b.isObject,
  5946.             P = b.isArray,
  5947.             Q = b.forEach,
  5948.             R = b.extend,
  5949.             S = b.copy,
  5950.             T = b.toJson;
  5951.         b.module("ui.router.util", ["ng"]), b.module("ui.router.router", ["ui.router.util"]), b.module("ui.router.state", ["ui.router.router", "ui.router.util"]), b.module("ui.router", ["ui.router.state"]), b.module("ui.router.compat", ["ui.router"]), p.$inject = ["$q", "$injector"], b.module("ui.router.util").service("$resolve", p), q.$inject = ["$http", "$templateCache", "$injector"],
  5952.             b.module("ui.router.util").service("$templateFactory", q);
  5953.         var U;
  5954.         r.prototype.concat = function(a, b) {
  5955.             var c = {
  5956.                 caseInsensitive: U.caseInsensitive(),
  5957.                 strict: U.strictMode(),
  5958.                 squash: U.defaultSquashPolicy()
  5959.             };
  5960.             return new r(this.sourcePath + a + this.sourceSearch, R(c, b), this)
  5961.         }, r.prototype.toString = function() {
  5962.             return this.source
  5963.         }, r.prototype.exec = function(a, b) {
  5964.             function c(a) {
  5965.                 function b(a) {
  5966.                     return a.split("").reverse().join("")
  5967.                 }
  5968.  
  5969.                 function c(a) {
  5970.                     return a.replace(/\\-/g, "-")
  5971.                 }
  5972.                 var d = b(a).split(/-(?!\\)/),
  5973.                     e = o(d, b);
  5974.                 return o(e, c).reverse()
  5975.             }
  5976.             var d = this.regexp.exec(a);
  5977.             if (!d) return null;
  5978.             b = b || {};
  5979.             var e, f, g, h = this.parameters(),
  5980.                 i = h.length,
  5981.                 j = this.segments.length - 1,
  5982.                 k = {};
  5983.             if (j !== d.length - 1) throw new Error("Unbalanced capture group in route '" + this.source + "'");
  5984.             var l, m;
  5985.             for (e = 0; j > e; e++) {
  5986.                 for (g = h[e], l = this.params[g], m = d[e + 1], f = 0; f < l.replace.length; f++) l.replace[f].from === m && (m = l.replace[f].to);
  5987.                 m && l.array === !0 && (m = c(m)), L(m) && (m = l.type.decode(m)), k[g] = l.value(m)
  5988.             }
  5989.             for (; i > e; e++) {
  5990.                 for (g = h[e], k[g] = this.params[g].value(b[g]), l = this.params[g], m = b[g], f = 0; f < l.replace.length; f++) l.replace[f].from === m && (m = l.replace[f].to);
  5991.                 L(m) && (m = l.type.decode(m)), k[g] = l.value(m)
  5992.             }
  5993.             return k
  5994.         }, r.prototype.parameters = function(a) {
  5995.             return L(a) ? this.params[a] || null : this.$$paramNames
  5996.         }, r.prototype.validates = function(a) {
  5997.             return this.params.$$validates(a)
  5998.         }, r.prototype.format = function(a) {
  5999.             function b(a) {
  6000.                 return encodeURIComponent(a).replace(/-/g, function(a) {
  6001.                     return "%5C%" + a.charCodeAt(0).toString(16).toUpperCase()
  6002.                 })
  6003.             }
  6004.             a = a || {};
  6005.             var c = this.segments,
  6006.                 d = this.parameters(),
  6007.                 e = this.params;
  6008.             if (!this.validates(a)) return null;
  6009.             var f, g = !1,
  6010.                 h = c.length - 1,
  6011.                 i = d.length,
  6012.                 j = c[0];
  6013.             for (f = 0; i > f; f++) {
  6014.                 var k = h > f,
  6015.                     l = d[f],
  6016.                     m = e[l],
  6017.                     n = m.value(a[l]),
  6018.                     p = m.isOptional && m.type.equals(m.value(), n),
  6019.                     q = p ? m.squash : !1,
  6020.                     r = m.type.encode(n);
  6021.                 if (k) {
  6022.                     var s = c[f + 1],
  6023.                         t = f + 1 === h;
  6024.                     if (q === !1) null != r && (j += P(r) ? o(r, b).join("-") : encodeURIComponent(r)), j += s;
  6025.                     else if (q === !0) {
  6026.                         var u = j.match(/\/$/) ? /\/?(.*)/ : /(.*)/;
  6027.                         j += s.match(u)[1]
  6028.                     } else N(q) && (j += q + s);
  6029.                     t && m.squash === !0 && "/" === j.slice(-1) && (j = j.slice(0, -1))
  6030.                 } else {
  6031.                     if (null == r || p && q !== !1) continue;
  6032.                     if (P(r) || (r = [r]), 0 === r.length) continue;
  6033.                     r = o(r, encodeURIComponent).join("&" + l + "="), j += (g ? "&" : "?") + (l + "=" + r), g = !0
  6034.                 }
  6035.             }
  6036.             return j
  6037.         }, s.prototype.is = function(a, b) {
  6038.             return !0
  6039.         }, s.prototype.encode = function(a, b) {
  6040.             return a
  6041.         }, s.prototype.decode = function(a, b) {
  6042.             return a
  6043.         }, s.prototype.equals = function(a, b) {
  6044.             return a == b
  6045.         }, s.prototype.$subPattern = function() {
  6046.             var a = this.pattern.toString();
  6047.             return a.substr(1, a.length - 2)
  6048.         }, s.prototype.pattern = /.*/, s.prototype.toString = function() {
  6049.             return "{Type:" + this.name + "}"
  6050.         }, s.prototype.$normalize = function(a) {
  6051.             return this.is(a) ? a : this.decode(a)
  6052.         }, s.prototype.$asArray = function(a, b) {
  6053.             function d(a, b) {
  6054.                 function d(a, b) {
  6055.                     return function() {
  6056.                         return a[b].apply(a, arguments)
  6057.                     }
  6058.                 }
  6059.  
  6060.                 function e(a) {
  6061.                     return P(a) ? a : L(a) ? [a] : []
  6062.                 }
  6063.  
  6064.                 function f(a) {
  6065.                     switch (a.length) {
  6066.                         case 0:
  6067.                             return c;
  6068.                         case 1:
  6069.                             return "auto" === b ? a[0] : a;
  6070.                         default:
  6071.                             return a
  6072.                     }
  6073.                 }
  6074.  
  6075.                 function g(a) {
  6076.                     return !a
  6077.                 }
  6078.  
  6079.                 function h(a, b) {
  6080.                     return function(c) {
  6081.                         if (P(c) && 0 === c.length) return c;
  6082.                         c = e(c);
  6083.                         var d = o(c, a);
  6084.                         return b === !0 ? 0 === n(d, g).length : f(d)
  6085.                     }
  6086.                 }
  6087.  
  6088.                 function i(a) {
  6089.                     return function(b, c) {
  6090.                         var d = e(b),
  6091.                             f = e(c);
  6092.                         if (d.length !== f.length) return !1;
  6093.                         for (var g = 0; g < d.length; g++)
  6094.                             if (!a(d[g], f[g])) return !1;
  6095.                         return !0
  6096.                     }
  6097.                 }
  6098.                 this.encode = h(d(a, "encode")), this.decode = h(d(a, "decode")), this.is = h(d(a, "is"), !0), this.equals = i(d(a, "equals")), this.pattern = a.pattern, this.$normalize = h(d(a, "$normalize")), this.name = a.name, this.$arrayMode = b
  6099.             }
  6100.             if (!a) return this;
  6101.             if ("auto" === a && !b) throw new Error("'auto' array mode is for query parameters only");
  6102.             return new d(this, a)
  6103.         }, b.module("ui.router.util").provider("$urlMatcherFactory", t), b.module("ui.router.util").run(["$urlMatcherFactory", function(a) {}]), u.$inject = ["$locationProvider", "$urlMatcherFactoryProvider"], b.module("ui.router.router").provider("$urlRouter", u), v.$inject = ["$urlRouterProvider", "$urlMatcherFactoryProvider"], b.module("ui.router.state").factory("$stateParams", function() {
  6104.             return {}
  6105.         }).provider("$state", v), w.$inject = [], b.module("ui.router.state").provider("$view", w), b.module("ui.router.state").provider("$uiViewScroll", x);
  6106.         var V = b.version.major,
  6107.             W = b.version.minor;
  6108.         y.$inject = ["$state", "$injector", "$uiViewScroll", "$interpolate"], z.$inject = ["$compile", "$controller", "$state", "$interpolate"], b.module("ui.router.state").directive("uiView", y), b.module("ui.router.state").directive("uiView", z), G.$inject = ["$state", "$timeout"], H.$inject = ["$state", "$timeout"], I.$inject = ["$state", "$stateParams", "$interpolate"], b.module("ui.router.state").directive("uiSref", G).directive("uiSrefActive", I).directive("uiSrefActiveEq", I).directive("uiState", H), J.$inject = ["$state"], K.$inject = ["$state"], b.module("ui.router.state").filter("isState", J).filter("includedByState", K)
  6109.     }(window, window.angular),
  6110.     function(a, b) {
  6111.         "object" == typeof exports && "undefined" != typeof module && "function" == typeof require ? b(require("../moment")) : "function" == typeof define && define.amd ? define(["moment"], b) : b(a.moment)
  6112.     }(this, function(a) {
  6113.         "use strict";
  6114.         var b = a.defineLocale("ka", {
  6115.             months: {
  6116.                 standalone: "იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),
  6117.                 format: "იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")
  6118.             },
  6119.             monthsShort: "იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),
  6120.             weekdays: {
  6121.                 standalone: "კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),
  6122.                 format: "კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),
  6123.                 isFormat: /(წინა|შემდეგ)/
  6124.             },
  6125.             weekdaysShort: "კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),
  6126.             weekdaysMin: "კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),
  6127.             longDateFormat: {
  6128.                 LT: "h:mm A",
  6129.                 LTS: "h:mm:ss A",
  6130.                 L: "DD/MM/YYYY",
  6131.                 LL: "D MMMM YYYY",
  6132.                 LLL: "D MMMM YYYY h:mm A",
  6133.                 LLLL: "dddd, D MMMM YYYY h:mm A"
  6134.             },
  6135.             calendar: {
  6136.                 sameDay: "[დღეს] LT[-ზე]",
  6137.                 nextDay: "[ხვალ] LT[-ზე]",
  6138.                 lastDay: "[გუშინ] LT[-ზე]",
  6139.                 nextWeek: "[შემდეგ] dddd LT[-ზე]",
  6140.                 lastWeek: "[წინა] dddd LT-ზე",
  6141.                 sameElse: "L"
  6142.             },
  6143.             relativeTime: {
  6144.                 future: function(a) {
  6145.                     return /(წამი|წუთი|საათი|წელი)/.test(a) ? a.replace(/ი$/, "ში") : a + "ში"
  6146.                 },
  6147.                 past: function(a) {
  6148.                     return /(წამი|წუთი|საათი|დღე|თვე)/.test(a) ? a.replace(/(ი|ე)$/, "ის წინ") : /წელი/.test(a) ? a.replace(/წელი$/, "წლის წინ") : void 0
  6149.                 },
  6150.                 s: "რამდენიმე წამი",
  6151.                 m: "წუთი",
  6152.                 mm: "%d წუთი",
  6153.                 h: "საათი",
  6154.                 hh: "%d საათი",
  6155.                 d: "დღე",
  6156.                 dd: "%d დღე",
  6157.                 M: "თვე",
  6158.                 MM: "%d თვე",
  6159.                 y: "წელი",
  6160.                 yy: "%d წელი"
  6161.             },
  6162.             ordinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
  6163.             ordinal: function(a) {
  6164.                 return 0 === a ? a : 1 === a ? a + "-ლი" : 20 > a || 100 >= a && a % 20 === 0 || a % 100 === 0 ? "მე-" + a : a + "-ე"
  6165.             },
  6166.             week: {
  6167.                 dow: 1,
  6168.                 doy: 7
  6169.             }
  6170.         });
  6171.         return b
  6172.     }), angular.module("ngMap", []),
  6173.     function() {
  6174.         "use strict";
  6175.         var a, b = function(b, c, d, e, f, g) {
  6176.             a = f;
  6177.             var h = this;
  6178.             h.mapOptions, h.mapEvents, h.ngMapDiv, h.addObject = function(a, b) {
  6179.                 if (h.map) {
  6180.                     h.map[a] = h.map[a] || {};
  6181.                     var c = Object.keys(h.map[a]).length;
  6182.                     h.map[a][b.id || c] = b, h.map instanceof google.maps.Map && ("infoWindows" != a && b.setMap && b.setMap && b.setMap(h.map), b.centered && b.position && h.map.setCenter(b.position), "markers" == a && h.objectChanged("markers"), "customMarkers" == a && h.objectChanged("customMarkers"))
  6183.                 }
  6184.             }, h.deleteObject = function(a, b) {
  6185.                 if (b.map) {
  6186.                     var c = b.map[a];
  6187.                     for (var d in c) c[d] === b && delete c[d];
  6188.                     b.map && b.setMap && b.setMap(null), "markers" == a && h.objectChanged("markers"), "customMarkers" == a && h.objectChanged("customMarkers")
  6189.                 }
  6190.             }, h.observeAttrSetObj = function(b, c, d) {
  6191.                 if (c.noWatcher) return !1;
  6192.                 for (var e = a.getAttrsToObserve(b), f = 0; f < e.length; f++) {
  6193.                     var h = e[f];
  6194.                     c.$observe(h, g.observeAndSet(h, d))
  6195.                 }
  6196.             }, h.zoomToIncludeMarkers = function() {
  6197.                 var a = new google.maps.LatLngBounds;
  6198.                 for (var b in h.map.markers) a.extend(h.map.markers[b].getPosition());
  6199.                 for (var c in h.map.customMarkers) a.extend(h.map.customMarkers[c].getPosition());
  6200.                 h.map.fitBounds(a)
  6201.             }, h.objectChanged = function(a) {
  6202.                 "markers" != a && "customMarkers" != a || "auto" != h.map.zoomToIncludeMarkers || h.zoomToIncludeMarkers()
  6203.             }, h.initializeMap = function() {
  6204.                 var a = h.mapOptions,
  6205.                     c = h.mapEvents,
  6206.                     f = h.ngMapDiv,
  6207.                     j = h.map;
  6208.                 if (h.map = new google.maps.Map(f, {}), j)
  6209.                     for (var k in j) {
  6210.                         var l = j[k];
  6211.                         if ("object" == typeof l)
  6212.                             for (var m in l) h.addObject(k, l[m])
  6213.                     }
  6214.                 a.zoom = a.zoom || 15;
  6215.                 var n = a.center;
  6216.                 if (!a.center || "string" == typeof n && n.match(/\{\{.*\}\}/)) a.center = new google.maps.LatLng(0, 0);
  6217.                 else if (!(n instanceof google.maps.LatLng)) {
  6218.                     var o = a.center;
  6219.                     delete a.center, g.getGeoLocation(o, a.geoLocationOptions).then(function(c) {
  6220.                         h.map.setCenter(c);
  6221.                         var d = a.geoCallback;
  6222.                         d && e(d)(b)
  6223.                     }, function() {
  6224.                         a.geoFallbackCenter && h.map.setCenter(a.geoFallbackCenter)
  6225.                     })
  6226.                 }
  6227.                 h.map.setOptions(a);
  6228.                 for (var p in c) google.maps.event.addListener(h.map, p, c[p]);
  6229.                 h.observeAttrSetObj(i, d, h.map), h.singleInfoWindow = a.singleInfoWindow, google.maps.event.addListenerOnce(h.map, "idle", function() {
  6230.                     g.addMap(h), a.zoomToIncludeMarkers && h.zoomToIncludeMarkers(), b.map = h.map, b.$emit("mapInitialized", h.map), d.mapInitialized && e(d.mapInitialized)(b, {
  6231.                         map: h.map
  6232.                     })
  6233.                 })
  6234.             }, b.google = google;
  6235.             var i = a.orgAttributes(c),
  6236.                 j = a.filter(d),
  6237.                 k = a.getOptions(j),
  6238.                 l = a.getControlOptions(j),
  6239.                 m = angular.extend(k, l),
  6240.                 n = a.getEvents(b, j);
  6241.             h.mapOptions = m, h.mapEvents = n, h.ngMapDiv = g.getNgMapDiv(c[0]), c.append(h.ngMapDiv), k.lazyInit ? (h.map = {
  6242.                 id: d.id
  6243.             }, g.addMap(h)) : h.initializeMap(), c.bind("$destroy", function() {
  6244.                 g.deleteMap(h)
  6245.             })
  6246.         };
  6247.         b.$inject = ["$scope", "$element", "$attrs", "$parse", "Attr2MapOptions", "NgMap"], angular.module("ngMap").controller("__MapController", b)
  6248.     }(),
  6249.     function() {
  6250.         "use strict";
  6251.         var a, b = function(b, d, e, f) {
  6252.                 f = f[0] || f[1];
  6253.                 var g = a.orgAttributes(d),
  6254.                     h = a.filter(e),
  6255.                     i = a.getOptions(h),
  6256.                     j = a.getEvents(b, h),
  6257.                     k = c(i, j);
  6258.                 f.addObject("bicyclingLayers", k), f.observeAttrSetObj(g, e, k), d.bind("$destroy", function() {
  6259.                     f.deleteObject("bicyclingLayers", k)
  6260.                 })
  6261.             },
  6262.             c = function(a, b) {
  6263.                 var c = new google.maps.BicyclingLayer(a);
  6264.                 for (var d in b) google.maps.event.addListener(c, d, b[d]);
  6265.                 return c
  6266.             },
  6267.             d = function(c) {
  6268.                 return a = c, {
  6269.                     restrict: "E",
  6270.                     require: ["?^map", "?^ngMap"],
  6271.                     link: b
  6272.                 }
  6273.             };
  6274.         d.$inject = ["Attr2MapOptions"], angular.module("ngMap").directive("bicyclingLayer", d)
  6275.     }(),
  6276.     function() {
  6277.         "use strict";
  6278.         var a, b, c, d = function(d, e, f, g) {
  6279.                 g = g[0] || g[1];
  6280.                 var h = a.filter(f),
  6281.                     i = a.getOptions(h),
  6282.                     j = a.getEvents(d, h),
  6283.                     k = e[0].parentElement.removeChild(e[0]);
  6284.                 b(k.innerHTML.trim())(d);
  6285.                 for (var l in j) google.maps.event.addDomListener(k, l, j[l]);
  6286.                 g.addObject("customControls", k), c.getMap().then(function(a) {
  6287.                     var b = i.position;
  6288.                     a.controls[google.maps.ControlPosition[b]].push(k)
  6289.                 })
  6290.             },
  6291.             e = function(e, f, g) {
  6292.                 return a = e, b = f, c = g, {
  6293.                     restrict: "E",
  6294.                     require: ["?^map", "?^ngMap"],
  6295.                     link: d
  6296.                 }
  6297.             };
  6298.         e.$inject = ["Attr2MapOptions", "$compile", "NgMap"], angular.module("ngMap").directive("customControl", e)
  6299.     }(),
  6300.     function() {
  6301.         "use strict";
  6302.         var a, b, c, d, e = function(a) {
  6303.                 a = a || {}, this.el = document.createElement("div"), this.el.style.display = "inline-block", this.visible = !0;
  6304.                 for (var b in a) this[b] = a[b]
  6305.             },
  6306.             f = function() {
  6307.                 e.prototype = new google.maps.OverlayView, e.prototype.setContent = function(a, b) {
  6308.                     this.el.innerHTML = a, this.el.style.position = "absolute", b && c(angular.element(this.el).contents())(b)
  6309.                 }, e.prototype.getDraggable = function() {
  6310.                     return this.draggable
  6311.                 }, e.prototype.setDraggable = function(a) {
  6312.                     this.draggable = a
  6313.                 }, e.prototype.getPosition = function() {
  6314.                     return this.position
  6315.                 }, e.prototype.setPosition = function(a) {
  6316.                     if (a && (this.position = a), this.getProjection() && "function" == typeof this.position.lng) {
  6317.                         var b = this.getProjection().fromLatLngToDivPixel(this.position),
  6318.                             c = Math.round(b.x - this.el.offsetWidth / 2),
  6319.                             d = Math.round(b.y - this.el.offsetHeight - 10);
  6320.                         this.el.style.left = c + "px", this.el.style.top = d + "px"
  6321.                     }
  6322.                 }, e.prototype.setZIndex = function(a) {
  6323.                     a && (this.zIndex = a), this.el.style.zIndex = this.zIndex
  6324.                 }, e.prototype.setVisible = function(a) {
  6325.                     this.el.style.display = a ? "inline-block" : "none", this.visible = a
  6326.                 }, e.prototype.addClass = function(a) {
  6327.                     var b = this.el.className.trim().split(" "); - 1 == b.indexOf(a) && b.push(a), this.el.className = b.join(" ")
  6328.                 }, e.prototype.removeClass = function(a) {
  6329.                     var b = this.el.className.split(" "),
  6330.                         c = b.indexOf(a);
  6331.                     c > -1 && b.splice(c, 1), this.el.className = b.join(" ")
  6332.                 }, e.prototype.onAdd = function() {
  6333.                     this.getPanes().overlayMouseTarget.appendChild(this.el)
  6334.                 }, e.prototype.draw = function() {
  6335.                     this.setPosition(), this.setZIndex(this.zIndex), this.setVisible(this.visible)
  6336.                 }, e.prototype.onRemove = function() {
  6337.                     this.el.parentNode.removeChild(this.el)
  6338.                 }
  6339.             },
  6340.             g = function(c, f) {
  6341.                 return function(g, h, i, j) {
  6342.                     j = j[0] || j[1];
  6343.                     var k = a.orgAttributes(h),
  6344.                         l = a.filter(i),
  6345.                         m = a.getOptions(l, g),
  6346.                         n = a.getEvents(g, l),
  6347.                         o = h[0].parentElement.removeChild(h[0]),
  6348.                         p = new e(m);
  6349.                     b(function() {
  6350.                         g.$watch("[" + f.join(",") + "]", function() {
  6351.                             p.setContent(c, g)
  6352.                         }), p.setContent(o.innerHTML, g);
  6353.                         var a = o.firstElementChild.className;
  6354.                         p.addClass("custom-marker"), p.addClass(a), m.position instanceof google.maps.LatLng || d.getGeoLocation(m.position).then(function(a) {
  6355.                             p.setPosition(a)
  6356.                         })
  6357.                     });
  6358.                     for (var q in n) google.maps.event.addDomListener(p.el, q, n[q]);
  6359.                     j.addObject("customMarkers", p), j.observeAttrSetObj(k, i, p), h.bind("$destroy", function() {
  6360.                         j.deleteObject("customMarkers", p)
  6361.                     })
  6362.                 }
  6363.             },
  6364.             h = function(e, h, i, j) {
  6365.                 return a = i, b = e, c = h, d = j, {
  6366.                     restrict: "E",
  6367.                     require: ["?^map", "?^ngMap"],
  6368.                     compile: function(a) {
  6369.                         f(), a[0].style.display = "none";
  6370.                         var b = a.html(),
  6371.                             c = b.match(/{{([^}]+)}}/g),
  6372.                             d = [];
  6373.                         return (c || []).forEach(function(a) {
  6374.                             var b = a.replace("{{", "").replace("}}", ""); - 1 == a.indexOf("::") && -1 == a.indexOf("this.") && -1 == d.indexOf(b) && d.push(a.replace("{{", "").replace("}}", ""))
  6375.                         }), g(b, d)
  6376.                     }
  6377.                 }
  6378.             };
  6379.         h.$inject = ["$timeout", "$compile", "Attr2MapOptions", "NgMap"], angular.module("ngMap").directive("customMarker", h)
  6380.     }(),
  6381.     function() {
  6382.         "use strict";
  6383.         var a, b, c, d = function(a, b) {
  6384.                 a.panel && (a.panel = document.getElementById(a.panel) || document.querySelector(a.panel));
  6385.                 var c = new google.maps.DirectionsRenderer(a);
  6386.                 for (var d in b) google.maps.event.addListener(c, d, b[d]);
  6387.                 return c
  6388.             },
  6389.             e = function(a, d) {
  6390.                 var e = new google.maps.DirectionsService,
  6391.                     f = d;
  6392.                 f.travelMode = f.travelMode || "DRIVING";
  6393.                 var g = ["origin", "destination", "travelMode", "transitOptions", "unitSystem", "durationInTraffic", "waypoints", "optimizeWaypoints", "provideRouteAlternatives", "avoidHighways", "avoidTolls", "region"];
  6394.                 for (var h in f) - 1 === g.indexOf(h) && delete f[h];
  6395.                 f.waypoints && ("[]" != f.waypoints && "" !== f.waypoints || delete f.waypoints);
  6396.                 var i = function(c) {
  6397.                     e.route(c, function(c, d) {
  6398.                         d == google.maps.DirectionsStatus.OK && b(function() {
  6399.                             a.setDirections(c)
  6400.                         })
  6401.                     })
  6402.                 };
  6403.                 f.origin && f.destination && ("current-location" == f.origin ? c.getCurrentPosition().then(function(a) {
  6404.                     f.origin = new google.maps.LatLng(a.coords.latitude, a.coords.longitude), i(f)
  6405.                 }) : "current-location" == f.destination ? c.getCurrentPosition().then(function(a) {
  6406.                     f.destination = new google.maps.LatLng(a.coords.latitude, a.coords.longitude), i(f)
  6407.                 }) : i(f))
  6408.             },
  6409.             f = function(f, g, h, i) {
  6410.                 var j = f;
  6411.                 a = i, b = g, c = h;
  6412.                 var k = function(c, f, g, h) {
  6413.                     h = h[0] || h[1];
  6414.                     var i = j.orgAttributes(f),
  6415.                         k = j.filter(g),
  6416.                         l = j.getOptions(k),
  6417.                         m = j.getEvents(c, k),
  6418.                         n = j.getAttrsToObserve(i),
  6419.                         o = d(l, m);
  6420.                     h.addObject("directionsRenderers", o), n.forEach(function(a) {
  6421.                         ! function(a) {
  6422.                             g.$observe(a, function(c) {
  6423.                                 if ("panel" == a) b(function() {
  6424.                                     var a = document.getElementById(c) || document.querySelector(c);
  6425.                                     a && o.setPanel(a)
  6426.                                 });
  6427.                                 else if (l[a] !== c) {
  6428.                                     var d = j.toOptionValue(c, {
  6429.                                         key: a
  6430.                                     });
  6431.                                     l[a] = d, e(o, l)
  6432.                                 }
  6433.                             })
  6434.                         }(a)
  6435.                     }), a.getMap().then(function() {
  6436.                         e(o, l)
  6437.                     }), f.bind("$destroy", function() {
  6438.                         h.deleteObject("directionsRenderers", o)
  6439.                     })
  6440.                 };
  6441.                 return {
  6442.                     restrict: "E",
  6443.                     require: ["?^map", "?^ngMap"],
  6444.                     link: k
  6445.                 }
  6446.             };
  6447.         f.$inject = ["Attr2MapOptions", "$timeout", "NavigatorGeolocation", "NgMap"], angular.module("ngMap").directive("directions", f)
  6448.     }(),
  6449.     function() {
  6450.         "use strict";
  6451.         angular.module("ngMap").directive("drawingManager", ["Attr2MapOptions", function(a) {
  6452.             var b = a;
  6453.             return {
  6454.                 restrict: "E",
  6455.                 require: ["?^map", "?^ngMap"],
  6456.                 link: function(a, c, d, e) {
  6457.                     e = e[0] || e[1];
  6458.                     var f = b.filter(d),
  6459.                         g = b.getOptions(f),
  6460.                         h = b.getControlOptions(f),
  6461.                         i = b.getEvents(a, f),
  6462.                         j = new google.maps.drawing.DrawingManager({
  6463.                             drawingMode: g.drawingmode,
  6464.                             drawingControl: g.drawingcontrol,
  6465.                             drawingControlOptions: h.drawingControlOptions,
  6466.                             circleOptions: g.circleoptions,
  6467.                             markerOptions: g.markeroptions,
  6468.                             polygonOptions: g.polygonoptions,
  6469.                             polylineOptions: g.polylineoptions,
  6470.                             rectangleOptions: g.rectangleoptions
  6471.                         });
  6472.                     for (var k in i) google.maps.event.addListener(j, k, i[k]);
  6473.                     e.addObject("mapDrawingManager", j)
  6474.                 }
  6475.             }
  6476.         }])
  6477.     }(),
  6478.     function() {
  6479.         "use strict";
  6480.         angular.module("ngMap").directive("dynamicMapsEngineLayer", ["Attr2MapOptions", function(a) {
  6481.             var b = a,
  6482.                 c = function(a, b) {
  6483.                     var c = new google.maps.visualization.DynamicMapsEngineLayer(a);
  6484.                     for (var d in b) google.maps.event.addListener(c, d, b[d]);
  6485.                     return c
  6486.                 };
  6487.             return {
  6488.                 restrict: "E",
  6489.                 require: ["?^map", "?^ngMap"],
  6490.                 link: function(a, d, e, f) {
  6491.                     f = f[0] || f[1];
  6492.                     var g = b.filter(e),
  6493.                         h = b.getOptions(g),
  6494.                         i = b.getEvents(a, g, i),
  6495.                         j = c(h, i);
  6496.                     f.addObject("mapsEngineLayers", j)
  6497.                 }
  6498.             }
  6499.         }])
  6500.     }(),
  6501.     function() {
  6502.         "use strict";
  6503.         angular.module("ngMap").directive("fusionTablesLayer", ["Attr2MapOptions", function(a) {
  6504.             var b = a,
  6505.                 c = function(a, b) {
  6506.                     var c = new google.maps.FusionTablesLayer(a);
  6507.                     for (var d in b) google.maps.event.addListener(c, d, b[d]);
  6508.                     return c
  6509.                 };
  6510.             return {
  6511.                 restrict: "E",
  6512.                 require: ["?^map", "?^ngMap"],
  6513.                 link: function(a, d, e, f) {
  6514.                     f = f[0] || f[1];
  6515.                     var g = b.filter(e),
  6516.                         h = b.getOptions(g),
  6517.                         i = b.getEvents(a, g, i),
  6518.                         j = c(h, i);
  6519.                     f.addObject("fusionTablesLayers", j)
  6520.                 }
  6521.             }
  6522.         }])
  6523.     }(),
  6524.     function() {
  6525.         "use strict";
  6526.         angular.module("ngMap").directive("heatmapLayer", ["Attr2MapOptions", "$window", function(a, b) {
  6527.             var c = a;
  6528.             return {
  6529.                 restrict: "E",
  6530.                 require: ["?^map", "?^ngMap"],
  6531.                 link: function(a, d, e, f) {
  6532.                     f = f[0] || f[1];
  6533.                     var g = c.filter(e),
  6534.                         h = c.getOptions(g);
  6535.                     if (h.data = b[e.data] || a[e.data], !(h.data instanceof Array)) throw "invalid heatmap data";
  6536.                     h.data = new google.maps.MVCArray(h.data);
  6537.                     var i = new google.maps.visualization.HeatmapLayer(h);
  6538.                     c.getEvents(a, g);
  6539.                     f.addObject("heatmapLayers", i)
  6540.                 }
  6541.             }
  6542.         }])
  6543.     }(),
  6544.     function() {
  6545.         "use strict";
  6546.         var a = function(a, b, c, d, e) {
  6547.             var f = a,
  6548.                 g = function(a, d, e) {
  6549.                     var f;
  6550.                     !a.position || a.position instanceof google.maps.LatLng || delete a.position, f = new google.maps.InfoWindow(a), Object.keys(d).length > 0;
  6551.                     for (var g in d) g && google.maps.event.addListener(f, g, d[g]);
  6552.                     var h = e.html().trim();
  6553.                     if (1 != angular.element(h).length) throw "info-window working as a template must have a container";
  6554.                     return f.__template = h.replace(/\s?ng-non-bindable[='"]+/, ""), f.__open = function(a, d, e) {
  6555.                         c(function() {
  6556.                             e && (d.anchor = e);
  6557.                             var c = b(f.__template)(d);
  6558.                             f.setContent(c[0]), d.$apply(), e && e.getPosition ? f.open(a, e) : e && e instanceof google.maps.LatLng ? (f.open(a), f.setPosition(e)) : f.open(a)
  6559.                         })
  6560.                     }, f
  6561.                 },
  6562.                 h = function(a, b, c, h) {
  6563.                     h = h[0] || h[1], b.css("display", "none");
  6564.                     var i, j = f.orgAttributes(b),
  6565.                         k = f.filter(c),
  6566.                         l = f.getOptions(k),
  6567.                         m = f.getEvents(a, k);
  6568.                     !l.position || l.position instanceof google.maps.LatLng || (i = l.position);
  6569.                     var n = g(l, m, b);
  6570.                     i && e.getGeoLocation(i).then(function(b) {
  6571.                         n.setPosition(b), n.__open(h.map, a, b);
  6572.                         var e = c.geoCallback;
  6573.                         e && d(e)(a)
  6574.                     }), h.addObject("infoWindows", n), h.observeAttrSetObj(j, c, n), h.map.showInfoWindow = h.map.showInfoWindow || function(b, c, d) {
  6575.                         var e = "string" == typeof b ? b : c,
  6576.                             f = "string" == typeof b ? c : d;
  6577.                         "string" == typeof f && (f = h.map.markers[f]);
  6578.                         var g = h.map.infoWindows[e],
  6579.                             i = f ? f : this.getPosition ? this : null;
  6580.                         g.__open(h.map, a, i), h.singleInfoWindow && (h.lastInfoWindow && a.hideInfoWindow(h.lastInfoWindow), h.lastInfoWindow = e)
  6581.                     }, h.map.hideInfoWindow = h.map.hideInfoWindow || function(a, b) {
  6582.                         var c = "string" == typeof a ? a : b,
  6583.                             d = h.map.infoWindows[c];
  6584.                         d.close()
  6585.                     }, a.showInfoWindow = h.map.showInfoWindow, a.hideInfoWindow = h.map.hideInfoWindow, e.getMap().then(function(b) {
  6586.                         if (n.visible && n.__open(b, a), n.visibleOnMarker) {
  6587.                             var c = n.visibleOnMarker;
  6588.                             n.__open(b, a, b.markers[c])
  6589.                         }
  6590.                     })
  6591.                 };
  6592.             return {
  6593.                 restrict: "E",
  6594.                 require: ["?^map", "?^ngMap"],
  6595.                 link: h
  6596.             }
  6597.         };
  6598.         a.$inject = ["Attr2MapOptions", "$compile", "$timeout", "$parse", "NgMap"], angular.module("ngMap").directive("infoWindow", a)
  6599.     }(),
  6600.     function() {
  6601.         "use strict";
  6602.         angular.module("ngMap").directive("kmlLayer", ["Attr2MapOptions", function(a) {
  6603.             var b = a,
  6604.                 c = function(a, b) {
  6605.                     var c = new google.maps.KmlLayer(a);
  6606.                     for (var d in b) google.maps.event.addListener(c, d, b[d]);
  6607.                     return c
  6608.                 };
  6609.             return {
  6610.                 restrict: "E",
  6611.                 require: ["?^map", "?^ngMap"],
  6612.                 link: function(a, d, e, f) {
  6613.                     f = f[0] || f[1];
  6614.                     var g = b.orgAttributes(d),
  6615.                         h = b.filter(e),
  6616.                         i = b.getOptions(h),
  6617.                         j = b.getEvents(a, h),
  6618.                         k = c(i, j);
  6619.                     f.addObject("kmlLayers", k), f.observeAttrSetObj(g, e, k), d.bind("$destroy", function() {
  6620.                         f.deleteObject("kmlLayers", k)
  6621.                     })
  6622.                 }
  6623.             }
  6624.         }])
  6625.     }(),
  6626.     function() {
  6627.         "use strict";
  6628.         angular.module("ngMap").directive("mapData", ["Attr2MapOptions", "NgMap", function(a, b) {
  6629.             var c = a;
  6630.             return {
  6631.                 restrict: "E",
  6632.                 require: ["?^map", "?^ngMap"],
  6633.                 link: function(a, d, e) {
  6634.                     var f = c.filter(e),
  6635.                         g = c.getOptions(f),
  6636.                         h = c.getEvents(a, f, h);
  6637.                     b.getMap().then(function(b) {
  6638.                         for (var c in g) {
  6639.                             var d = g[c];
  6640.                             "function" == typeof a[d] ? b.data[c](a[d]) : b.data[c](d)
  6641.                         }
  6642.                         for (var e in h) b.data.addListener(e, h[e])
  6643.                     })
  6644.                 }
  6645.             }
  6646.         }])
  6647.     }(),
  6648.     function() {
  6649.         "use strict";
  6650.         var a, b, c, d, e = function(c, e, f) {
  6651.                 var g = f.mapLazyLoadParams || f.mapLazyLoad;
  6652.                 if (window.lazyLoadCallback = function() {
  6653.                         a(function() {
  6654.                             e.html(d), b(e.contents())(c)
  6655.                         }, 100)
  6656.                     }, void 0 === window.google || void 0 === window.google.maps) {
  6657.                     var h = document.createElement("script");
  6658.                     h.src = g + (g.indexOf("?") > -1 ? "&" : "?") + "callback=lazyLoadCallback", document.body.appendChild(h)
  6659.                 } else e.html(d), b(e.contents())(c)
  6660.             },
  6661.             f = function(a, b) {
  6662.                 return !b.mapLazyLoad && void 0, d = a.html(), c = b.mapLazyLoad, document.querySelector('script[src="' + c + (c.indexOf("?") > -1 ? "&" : "?") + 'callback=lazyLoadCallback"]') ? !1 : (a.html(""), {
  6663.                     pre: e
  6664.                 })
  6665.             },
  6666.             g = function(c, d) {
  6667.                 return b = c, a = d, {
  6668.                     compile: f
  6669.                 }
  6670.             };
  6671.         g.$inject = ["$compile", "$timeout"], angular.module("ngMap").directive("mapLazyLoad", g)
  6672.     }(),
  6673.     function() {
  6674.         "use strict";
  6675.         angular.module("ngMap").directive("mapType", ["$parse", "NgMap", function(a, b) {
  6676.             return {
  6677.                 restrict: "E",
  6678.                 require: ["?^map", "?^ngMap"],
  6679.                 link: function(c, d, e, f) {
  6680.                     f = f[0] || f[1];
  6681.                     var g, h = e.name;
  6682.                     if (!h) throw "invalid map-type name";
  6683.                     if (g = a(e.object)(c), !g) throw "invalid map-type object";
  6684.                     b.getMap().then(function(a) {
  6685.                         a.mapTypes.set(h, g)
  6686.                     }), f.addObject("mapTypes", g)
  6687.                 }
  6688.             }
  6689.         }])
  6690.     }(),
  6691.     function() {
  6692.         "use strict";
  6693.         var a = function() {
  6694.             return {
  6695.                 restrict: "AE",
  6696.                 controller: "__MapController",
  6697.                 conrollerAs: "ngmap"
  6698.             }
  6699.         };
  6700.         angular.module("ngMap").directive("map", [a]), angular.module("ngMap").directive("ngMap", [a])
  6701.     }(),
  6702.     function() {
  6703.         "use strict";
  6704.         angular.module("ngMap").directive("mapsEngineLayer", ["Attr2MapOptions", function(a) {
  6705.             var b = a,
  6706.                 c = function(a, b) {
  6707.                     var c = new google.maps.visualization.MapsEngineLayer(a);
  6708.                     for (var d in b) google.maps.event.addListener(c, d, b[d]);
  6709.                     return c
  6710.                 };
  6711.             return {
  6712.                 restrict: "E",
  6713.                 require: ["?^map", "?^ngMap"],
  6714.                 link: function(a, d, e, f) {
  6715.                     f = f[0] || f[1];
  6716.                     var g = b.filter(e),
  6717.                         h = b.getOptions(g),
  6718.                         i = b.getEvents(a, g, i),
  6719.                         j = c(h, i);
  6720.                     f.addObject("mapsEngineLayers", j)
  6721.                 }
  6722.             }
  6723.         }])
  6724.     }(),
  6725.     function() {
  6726.         "use strict";
  6727.         var a, b, c, d = function(a, b) {
  6728.                 var d;
  6729.                 if (c.defaultOptions.marker)
  6730.                     for (var e in c.defaultOptions.marker) "undefined" == typeof a[e] && (a[e] = c.defaultOptions.marker[e]);
  6731.                 a.position instanceof google.maps.LatLng || (a.position = new google.maps.LatLng(0, 0)), d = new google.maps.Marker(a), Object.keys(b).length > 0;
  6732.                 for (var f in b) f && google.maps.event.addListener(d, f, b[f]);
  6733.                 return d
  6734.             },
  6735.             e = function(e, f, g, h) {
  6736.                 h = h[0] || h[1];
  6737.                 var i, j = a.orgAttributes(f),
  6738.                     k = a.filter(g),
  6739.                     l = a.getOptions(k, e),
  6740.                     m = a.getEvents(e, k);
  6741.                 l.position instanceof google.maps.LatLng || (i = l.position);
  6742.                 var n = d(l, m);
  6743.                 h.addObject("markers", n), i && c.getGeoLocation(i).then(function(a) {
  6744.                     n.setPosition(a), l.centered && n.map.setCenter(a);
  6745.                     var c = g.geoCallback;
  6746.                     c && b(c)(e)
  6747.                 }), h.observeAttrSetObj(j, g, n), f.bind("$destroy", function() {
  6748.                     h.deleteObject("markers", n)
  6749.                 })
  6750.             },
  6751.             f = function(d, f, g) {
  6752.                 return a = d, b = f, c = g, {
  6753.                     restrict: "E",
  6754.                     require: ["^?map", "?^ngMap"],
  6755.                     link: e
  6756.                 }
  6757.             };
  6758.         f.$inject = ["Attr2MapOptions", "$parse", "NgMap"], angular.module("ngMap").directive("marker", f)
  6759.     }(),
  6760.     function() {
  6761.         "use strict";
  6762.         angular.module("ngMap").directive("overlayMapType", ["NgMap", function(a) {
  6763.             return {
  6764.                 restrict: "E",
  6765.                 require: ["?^map", "?^ngMap"],
  6766.                 link: function(b, c, d, e) {
  6767.                     e = e[0] || e[1];
  6768.                     var f = d.initMethod || "insertAt",
  6769.                         g = b[d.object];
  6770.                     a.getMap().then(function(a) {
  6771.                         if ("insertAt" == f) {
  6772.                             var b = parseInt(d.index, 10);
  6773.                             a.overlayMapTypes.insertAt(b, g)
  6774.                         } else "push" == f && a.overlayMapTypes.push(g)
  6775.                     }), e.addObject("overlayMapTypes", g)
  6776.                 }
  6777.             }
  6778.         }])
  6779.     }(),
  6780.     function() {
  6781.         "use strict";
  6782.         var a = function(a, b) {
  6783.             var c = a,
  6784.                 d = function(a, d, e, f) {
  6785.                     if ("false" === e.placesAutoComplete) return !1;
  6786.                     var g = c.filter(e),
  6787.                         h = c.getOptions(g),
  6788.                         i = c.getEvents(a, g),
  6789.                         j = new google.maps.places.Autocomplete(d[0], h);
  6790.                     for (var k in i) google.maps.event.addListener(j, k, i[k]);
  6791.                     var l = function() {
  6792.                         b(function() {
  6793.                             f && f.$setViewValue(d.val())
  6794.                         }, 100)
  6795.                     };
  6796.                     google.maps.event.addListener(j, "place_changed", l), d[0].addEventListener("change", l), e.$observe("types", function(a) {
  6797.                         if (a) {
  6798.                             var b = c.toOptionValue(a, {
  6799.                                 key: "types"
  6800.                             });
  6801.                             j.setTypes(b)
  6802.                         }
  6803.                     })
  6804.                 };
  6805.             return {
  6806.                 restrict: "A",
  6807.                 require: "?ngModel",
  6808.                 link: d
  6809.             }
  6810.         };
  6811.         a.$inject = ["Attr2MapOptions", "$timeout"], angular.module("ngMap").directive("placesAutoComplete", a)
  6812.     }(),
  6813.     function() {
  6814.         "use strict";
  6815.         var a = function(a, b) {
  6816.                 var c, d = a.name;
  6817.                 switch (delete a.name, d) {
  6818.                     case "circle":
  6819.                         a.center instanceof google.maps.LatLng || (a.center = new google.maps.LatLng(0, 0)), c = new google.maps.Circle(a);
  6820.                         break;
  6821.                     case "polygon":
  6822.                         c = new google.maps.Polygon(a);
  6823.                         break;
  6824.                     case "polyline":
  6825.                         c = new google.maps.Polyline(a);
  6826.                         break;
  6827.                     case "rectangle":
  6828.                         c = new google.maps.Rectangle(a);
  6829.                         break;
  6830.                     case "groundOverlay":
  6831.                     case "image":
  6832.                         var e = a.url,
  6833.                             f = {
  6834.                                 opacity: a.opacity,
  6835.                                 clickable: a.clickable,
  6836.                                 id: a.id
  6837.                             };
  6838.                         c = new google.maps.GroundOverlay(e, a.bounds, f)
  6839.                 }
  6840.                 for (var g in b) b[g] && google.maps.event.addListener(c, g, b[g]);
  6841.                 return c
  6842.             },
  6843.             b = function(b, c, d) {
  6844.                 var e = b,
  6845.                     f = function(b, f, g, h) {
  6846.                         h = h[0] || h[1];
  6847.                         var i, j, k = e.orgAttributes(f),
  6848.                             l = e.filter(g),
  6849.                             m = e.getOptions(l),
  6850.                             n = e.getEvents(b, l);
  6851.                         j = m.name, m.center instanceof google.maps.LatLng || (i = m.center);
  6852.                         var o = a(m, n);
  6853.                         h.addObject("shapes", o), i && "circle" == j && d.getGeoLocation(i).then(function(a) {
  6854.                             o.setCenter(a), o.centered && o.map.setCenter(a);
  6855.                             var d = g.geoCallback;
  6856.                             d && c(d)(b)
  6857.                         }), h.observeAttrSetObj(k, g, o), f.bind("$destroy", function() {
  6858.                             h.deleteObject("shapes", o)
  6859.                         })
  6860.                     };
  6861.                 return {
  6862.                     restrict: "E",
  6863.                     require: ["?^map", "?^ngMap"],
  6864.                     link: f
  6865.                 }
  6866.             };
  6867.         b.$inject = ["Attr2MapOptions", "$parse", "NgMap"], angular.module("ngMap").directive("shape", b)
  6868.     }(),
  6869.     function() {
  6870.         "use strict";
  6871.         var a = function(a, b) {
  6872.             var c = a,
  6873.                 d = function(a, b, c) {
  6874.                     var d, e;
  6875.                     b.container && (e = document.getElementById(b.container), e = e || document.querySelector(b.container)), e ? d = new google.maps.StreetViewPanorama(e, b) : (d = a.getStreetView(), d.setOptions(b));
  6876.                     for (var f in c) f && google.maps.event.addListener(d, f, c[f]);
  6877.                     return d
  6878.                 },
  6879.                 e = function(a, e, f) {
  6880.                     var g = c.filter(f),
  6881.                         h = c.getOptions(g),
  6882.                         i = c.getControlOptions(g),
  6883.                         j = angular.extend(h, i),
  6884.                         k = c.getEvents(a, g);
  6885.                     b.getMap().then(function(a) {
  6886.                         var b = d(a, j, k);
  6887.                         a.setStreetView(b), !b.getPosition() && b.setPosition(a.getCenter()), google.maps.event.addListener(b, "position_changed", function() {
  6888.                             b.getPosition() !== a.getCenter() && a.setCenter(b.getPosition())
  6889.                         });
  6890.                         var c = google.maps.event.addListener(a, "center_changed", function() {
  6891.                             b.setPosition(a.getCenter()), google.maps.event.removeListener(c)
  6892.                         })
  6893.                     })
  6894.                 };
  6895.             return {
  6896.                 restrict: "E",
  6897.                 require: ["?^map", "?^ngMap"],
  6898.                 link: e
  6899.             }
  6900.         };
  6901.         a.$inject = ["Attr2MapOptions", "NgMap"], angular.module("ngMap").directive("streetViewPanorama", a)
  6902.     }(),
  6903.     function() {
  6904.         "use strict";
  6905.         angular.module("ngMap").directive("trafficLayer", ["Attr2MapOptions", function(a) {
  6906.             var b = a,
  6907.                 c = function(a, b) {
  6908.                     var c = new google.maps.TrafficLayer(a);
  6909.                     for (var d in b) google.maps.event.addListener(c, d, b[d]);
  6910.                     return c
  6911.                 };
  6912.             return {
  6913.                 restrict: "E",
  6914.                 require: ["?^map", "?^ngMap"],
  6915.                 link: function(a, d, e, f) {
  6916.                     f = f[0] || f[1];
  6917.                     var g = b.orgAttributes(d),
  6918.                         h = b.filter(e),
  6919.                         i = b.getOptions(h),
  6920.                         j = b.getEvents(a, h),
  6921.                         k = c(i, j);
  6922.                     f.addObject("trafficLayers", k), f.observeAttrSetObj(g, e, k), d.bind("$destroy", function() {
  6923.                         f.deleteObject("trafficLayers", k)
  6924.                     })
  6925.                 }
  6926.             }
  6927.         }])
  6928.     }(),
  6929.     function() {
  6930.         "use strict";
  6931.         angular.module("ngMap").directive("transitLayer", ["Attr2MapOptions", function(a) {
  6932.             var b = a,
  6933.                 c = function(a, b) {
  6934.                     var c = new google.maps.TransitLayer(a);
  6935.                     for (var d in b) google.maps.event.addListener(c, d, b[d]);
  6936.                     return c
  6937.                 };
  6938.             return {
  6939.                 restrict: "E",
  6940.                 require: ["?^map", "?^ngMap"],
  6941.                 link: function(a, d, e, f) {
  6942.                     f = f[0] || f[1];
  6943.                     var g = b.orgAttributes(d),
  6944.                         h = b.filter(e),
  6945.                         i = b.getOptions(h),
  6946.                         j = b.getEvents(a, h),
  6947.                         k = c(i, j);
  6948.                     f.addObject("transitLayers", k), f.observeAttrSetObj(g, e, k), d.bind("$destroy", function() {
  6949.                         f.deleteObject("transitLayers", k)
  6950.                     })
  6951.                 }
  6952.             }
  6953.         }])
  6954.     }(),
  6955.     function() {
  6956.         "use strict";
  6957.         var a = /([\:\-\_]+(.))/g,
  6958.             b = /^moz([A-Z])/,
  6959.             c = function() {
  6960.                 return function(c) {
  6961.                     return c.replace(a, function(a, b, c, d) {
  6962.                         return d ? c.toUpperCase() : c
  6963.                     }).replace(b, "Moz$1")
  6964.                 }
  6965.             };
  6966.         angular.module("ngMap").filter("camelCase", c)
  6967.     }(),
  6968.     function() {
  6969.         "use strict";
  6970.         var a = function() {
  6971.             return function(a) {
  6972.                 try {
  6973.                     return JSON.parse(a), a
  6974.                 } catch (b) {
  6975.                     return a.replace(/([\$\w]+)\s*:/g, function(a, b) {
  6976.                         return '"' + b + '":'
  6977.                     }).replace(/'([^']+)'/g, function(a, b) {
  6978.                         return '"' + b + '"'
  6979.                     })
  6980.                 }
  6981.             }
  6982.         };
  6983.         angular.module("ngMap").filter("jsonize", a)
  6984.     }(),
  6985.     function() {
  6986.         "use strict";
  6987.         var isoDateRE = /^(\d{4}\-\d\d\-\d\d([tT][\d:\.]*)?)([zZ]|([+\-])(\d\d):?(\d\d))?$/,
  6988.             Attr2MapOptions = function($parse, $timeout, $log, NavigatorGeolocation, GeoCoder, camelCaseFilter, jsonizeFilter) {
  6989.                 var orgAttributes = function(a) {
  6990.                         a.length > 0 && (a = a[0]);
  6991.                         for (var b = {}, c = 0; c < a.attributes.length; c++) {
  6992.                             var d = a.attributes[c];
  6993.                             b[d.name] = d.value
  6994.                         }
  6995.                         return b
  6996.                     },
  6997.                     getJSON = function(a) {
  6998.                         var b = /^[\+\-]?[0-9\.]+,[ ]*\ ?[\+\-]?[0-9\.]+$/;
  6999.                         return a.match(b) && (a = "[" + a + "]"), JSON.parse(jsonizeFilter(a))
  7000.                     },
  7001.                     getLatLng = function(a) {
  7002.                         var b = a;
  7003.                         return a[0].constructor == Array ? b = a.map(function(a) {
  7004.                             return new google.maps.LatLng(a[0], a[1])
  7005.                         }) : !isNaN(parseFloat(a[0])) && isFinite(a[0]) && (b = new google.maps.LatLng(b[0], b[1])), b
  7006.                     },
  7007.                     toOptionValue = function(input, options) {
  7008.                         var output;
  7009.                         try {
  7010.                             output = getNumber(input)
  7011.                         } catch (err) {
  7012.                             try {
  7013.                                 var output = getJSON(input);
  7014.                                 if (output instanceof Array) output = output[0].constructor == Object ? output : getLatLng(output);
  7015.                                 else if (output === Object(output)) {
  7016.                                     var newOptions = options;
  7017.                                     newOptions.doNotConverStringToNumber = !0, output = getOptions(output, newOptions)
  7018.                                 }
  7019.                             } catch (err2) {
  7020.                                 if (input.match(/^[A-Z][a-zA-Z0-9]+\(.*\)$/)) try {
  7021.                                     var exp = "new google.maps." + input;
  7022.                                     output = eval(exp)
  7023.                                 } catch (e) {
  7024.                                     output = input
  7025.                                 } else if (input.match(/^([A-Z][a-zA-Z0-9]+)\.([A-Z]+)$/)) try {
  7026.                                     var matches = input.match(/^([A-Z][a-zA-Z0-9]+)\.([A-Z]+)$/);
  7027.                                     output = google.maps[matches[1]][matches[2]]
  7028.                                 } catch (e) {
  7029.                                     output = input
  7030.                                 } else if (input.match(/^[A-Z]+$/)) try {
  7031.                                     var capitalizedKey = options.key.charAt(0).toUpperCase() + options.key.slice(1);
  7032.                                     options.key.match(/temperatureUnit|windSpeedUnit|labelColor/) ? (capitalizedKey = capitalizedKey.replace(/s$/, ""), output = google.maps.weather[capitalizedKey][input]) : output = google.maps[capitalizedKey][input]
  7033.                                 } catch (e) {
  7034.                                     output = input
  7035.                                 } else if (input.match(isoDateRE)) try {
  7036.                                     output = new Date(input)
  7037.                                 } catch (e) {
  7038.                                     output = input
  7039.                                 } else output = input
  7040.                             }
  7041.                         }
  7042.                         if ("bounds" == options.key && output instanceof Array && (output = new google.maps.LatLngBounds(output[0], output[1])), "icons" == options.key && output instanceof Array)
  7043.                             for (var i = 0; i < output.length; i++) {
  7044.                                 var el = output[i];
  7045.                                 el.icon.path.match(/^[A-Z_]+$/) && (el.icon.path = google.maps.SymbolPath[el.icon.path])
  7046.                             }
  7047.                         if ("icon" == options.key && output instanceof Object) {
  7048.                             ("" + output.path).match(/^[A-Z_]+$/) && (output.path = google.maps.SymbolPath[output.path]);
  7049.                             for (var key in output) {
  7050.                                 var arr = output[key];
  7051.                                 "anchor" == key || "origin" == key ? output[key] = new google.maps.Point(arr[0], arr[1]) : "size" != key && "scaledSize" != key || (output[key] = new google.maps.Size(arr[0], arr[1]))
  7052.                             }
  7053.                         }
  7054.                         return output
  7055.                     },
  7056.                     getAttrsToObserve = function(a) {
  7057.                         var b = [];
  7058.                         if (!a.noWatcher)
  7059.                             for (var c in a) {
  7060.                                 var d = a[c];
  7061.                                 d && d.match(/\{\{.*\}\}/) && b.push(camelCaseFilter(c))
  7062.                             }
  7063.                         return b
  7064.                     },
  7065.                     filter = function(a) {
  7066.                         var b = {};
  7067.                         for (var c in a) c.match(/^\$/) || c.match(/^ng[A-Z]/) || (b[c] = a[c]);
  7068.                         return b
  7069.                     },
  7070.                     getOptions = function(a, b) {
  7071.                         var c = {};
  7072.                         for (var d in a)
  7073.                             if (a[d] || 0 === a[d]) {
  7074.                                 if (d.match(/^on[A-Z]/)) continue;
  7075.                                 if (d.match(/ControlOptions$/)) continue;
  7076.                                 "string" != typeof a[d] ? c[d] = a[d] : b && b.doNotConverStringToNumber && a[d].match(/^[0-9]+$/) ? c[d] = a[d] : c[d] = toOptionValue(a[d], {
  7077.                                     key: d
  7078.                                 })
  7079.                             }
  7080.                         return c
  7081.                     },
  7082.                     getEvents = function(a, b) {
  7083.                         var c = {},
  7084.                             d = function(a) {
  7085.                                 return "_" + a.toLowerCase()
  7086.                             },
  7087.                             e = function(b) {
  7088.                                 var c = b.match(/([^\(]+)\(([^\)]*)\)/),
  7089.                                     d = c[1],
  7090.                                     e = c[2].replace(/event[ ,]*/, ""),
  7091.                                     f = $parse("[" + e + "]");
  7092.                                 return function(b) {
  7093.                                     function c(a, b) {
  7094.                                         return a[b]
  7095.                                     }
  7096.                                     var e = f(a),
  7097.                                         g = d.split(".").reduce(c, a);
  7098.                                     g && g.apply(this, [b].concat(e)), $timeout(function() {
  7099.                                         a.$apply()
  7100.                                     })
  7101.                                 }
  7102.                             };
  7103.                         for (var f in b)
  7104.                             if (b[f]) {
  7105.                                 if (!f.match(/^on[A-Z]/)) continue;
  7106.                                 var g = f.replace(/^on/, "");
  7107.                                 g = g.charAt(0).toLowerCase() + g.slice(1), g = g.replace(/([A-Z])/g, d);
  7108.                                 var h = b[f];
  7109.                                 c[g] = new e(h)
  7110.                             }
  7111.                         return c
  7112.                     },
  7113.                     getControlOptions = function(a) {
  7114.                         var b = {};
  7115.                         if ("object" != typeof a) return !1;
  7116.                         for (var c in a)
  7117.                             if (a[c]) {
  7118.                                 if (!c.match(/(.*)ControlOptions$/)) continue;
  7119.                                 var d = a[c],
  7120.                                     e = d.replace(/'/g, '"');
  7121.                                 e = e.replace(/([^"]+)|("[^"]+")/g, function(a, b, c) {
  7122.                                     return b ? b.replace(/([a-zA-Z0-9]+?):/g, '"$1":') : c
  7123.                                 });
  7124.                                 try {
  7125.                                     var f = JSON.parse(e);
  7126.                                     for (var g in f)
  7127.                                         if (f[g]) {
  7128.                                             var h = f[g];
  7129.                                             if ("string" == typeof h ? h = h.toUpperCase() : "mapTypeIds" === g && (h = h.map(function(a) {
  7130.                                                     return a.match(/^[A-Z]+$/) ? google.maps.MapTypeId[a.toUpperCase()] : a
  7131.                                                 })), "style" === g) {
  7132.                                                 var i = c.charAt(0).toUpperCase() + c.slice(1),
  7133.                                                     j = i.replace(/Options$/, "") + "Style";
  7134.                                                 f[g] = google.maps[j][h]
  7135.                                             } else "position" === g ? f[g] = google.maps.ControlPosition[h] : f[g] = h
  7136.                                         }
  7137.                                     b[c] = f
  7138.                                 } catch (k) {}
  7139.                             }
  7140.                         return b
  7141.                     };
  7142.                 return {
  7143.                     filter: filter,
  7144.                     getOptions: getOptions,
  7145.                     getEvents: getEvents,
  7146.                     getControlOptions: getControlOptions,
  7147.                     toOptionValue: toOptionValue,
  7148.                     getAttrsToObserve: getAttrsToObserve,
  7149.                     orgAttributes: orgAttributes
  7150.                 }
  7151.             };
  7152.         Attr2MapOptions.$inject = ["$parse", "$timeout", "$log", "NavigatorGeolocation", "GeoCoder", "camelCaseFilter", "jsonizeFilter"], angular.module("ngMap").service("Attr2MapOptions", Attr2MapOptions)
  7153.     }(),
  7154.     function() {
  7155.         "use strict";
  7156.         var a, b = function(b) {
  7157.                 var c = a.defer(),
  7158.                     d = new google.maps.Geocoder;
  7159.                 return d.geocode(b, function(a, b) {
  7160.                     b == google.maps.GeocoderStatus.OK ? c.resolve(a) : c.reject(b)
  7161.                 }), c.promise
  7162.             },
  7163.             c = function(c) {
  7164.                 return a = c, {
  7165.                     geocode: b
  7166.                 }
  7167.             };
  7168.         c.$inject = ["$q"], angular.module("ngMap").service("GeoCoder", c)
  7169.     }(),
  7170.     function() {
  7171.         "use strict";
  7172.         var a, b = function(b) {
  7173.                 var c = a.defer();
  7174.                 return navigator.geolocation ? (void 0 === b ? b = {
  7175.                         timeout: 5e3
  7176.                     } : void 0 === b.timeout && (b.timeout = 5e3),
  7177.                     navigator.geolocation.getCurrentPosition(function(a) {
  7178.                         c.resolve(a)
  7179.                     }, function(a) {
  7180.                         c.reject(a)
  7181.                     }, b)) : c.reject("Browser Geolocation service failed."), c.promise
  7182.             },
  7183.             c = function(c) {
  7184.                 return a = c, {
  7185.                     getCurrentPosition: b
  7186.                 }
  7187.             };
  7188.         c.$inject = ["$q"], angular.module("ngMap").service("NavigatorGeolocation", c)
  7189.     }(),
  7190.     function() {
  7191.         "use strict";
  7192.         var a, b, c, d, e, f, g, h = {},
  7193.             i = function(a) {
  7194.                 var b = h[a || 0];
  7195.                 b.map instanceof google.maps.Map || b.initializeMap()
  7196.             },
  7197.             j = function(b) {
  7198.                 function d(b) {
  7199.                     h[f] ? e.resolve(h[f].map) : b > g ? e.reject("could not find map") : a.setTimeout(function() {
  7200.                         d(b + 100)
  7201.                     }, 100)
  7202.                 }
  7203.                 b = b || {};
  7204.                 var e = c.defer(),
  7205.                     f = b.id || 0,
  7206.                     g = b.timeout || 2e3;
  7207.                 return d(0), e.promise
  7208.             },
  7209.             k = function(a) {
  7210.                 var b = Object.keys(h).length;
  7211.                 h[a.map.id || b] = a
  7212.             },
  7213.             l = function(a) {
  7214.                 var b = Object.keys(h).length - 1;
  7215.                 delete h[a.map.id || b]
  7216.             },
  7217.             m = function(c, d) {
  7218.                 var e;
  7219.                 return c.currentStyle ? e = c.currentStyle[d] : a.getComputedStyle && (e = b.defaultView.getComputedStyle(c, null).getPropertyValue(d)), e
  7220.             },
  7221.             n = function(a) {
  7222.                 var c = b.createElement("div"),
  7223.                     d = a.getAttribute("default-style");
  7224.                 return c.style.width = "100%", c.style.height = "100%", "true" == d ? (a.style.display = "block", a.style.height = "300px") : ("block" != m(a, "display") && (a.style.display = "block"), m(a, "height").match(/^(0|auto)/) && (a.style.height = "300px")), c.addEventListener("dragstart", function(a) {
  7225.                     return a.preventDefault(), !1
  7226.                 }), c
  7227.             },
  7228.             o = function(a, b) {
  7229.                 var e = c.defer();
  7230.                 return !a || a.match(/^current/i) ? d.getCurrentPosition(b).then(function(a) {
  7231.                     var b = a.coords.latitude,
  7232.                         c = a.coords.longitude,
  7233.                         d = new google.maps.LatLng(b, c);
  7234.                     e.resolve(d)
  7235.                 }, function(a) {
  7236.                     e.reject(a)
  7237.                 }) : f.geocode({
  7238.                     address: a
  7239.                 }).then(function(a) {
  7240.                     e.resolve(a[0].geometry.location)
  7241.                 }, function(a) {
  7242.                     e.reject(a)
  7243.                 }), e.promise
  7244.             },
  7245.             p = function(a, b) {
  7246.                 return function(c) {
  7247.                     if (c) {
  7248.                         var d = g("set-" + a),
  7249.                             f = e.toOptionValue(c, {
  7250.                                 key: a
  7251.                             });
  7252.                         b[d] && (a.match(/center|position/) && "string" == typeof f ? o(f).then(function(a) {
  7253.                             b[d](a)
  7254.                         }) : b[d](f))
  7255.                     }
  7256.                 }
  7257.             };
  7258.         angular.module("ngMap").provider("NgMap", function() {
  7259.             var h = {};
  7260.             this.setDefaultOptions = function(a) {
  7261.                 h = a
  7262.             };
  7263.             var q = function(q, r, s, t, u, v, w) {
  7264.                 return a = q, b = r[0], c = s, d = t, e = u, f = v, g = w, {
  7265.                     defaultOptions: h,
  7266.                     addMap: k,
  7267.                     deleteMap: l,
  7268.                     getMap: j,
  7269.                     initMap: i,
  7270.                     getStyle: m,
  7271.                     getNgMapDiv: n,
  7272.                     getGeoLocation: o,
  7273.                     observeAndSet: p
  7274.                 }
  7275.             };
  7276.             q.$inject = ["$window", "$document", "$q", "NavigatorGeolocation", "Attr2MapOptions", "GeoCoder", "camelCaseFilter"], this.$get = q
  7277.         })
  7278.     }(),
  7279.     function() {
  7280.         "use strict";
  7281.         var a, b = function(b, c) {
  7282.                 c = c || b.getCenter();
  7283.                 var d = a.defer(),
  7284.                     e = new google.maps.StreetViewService;
  7285.                 return e.getPanoramaByLocation(c || b.getCenter, 100, function(a, b) {
  7286.                     b === google.maps.StreetViewStatus.OK ? d.resolve(a.location.pano) : d.resolve(!1)
  7287.                 }), d.promise
  7288.             },
  7289.             c = function(a, b) {
  7290.                 var c = new google.maps.StreetViewPanorama(a.getDiv(), {
  7291.                     enableCloseButton: !0
  7292.                 });
  7293.                 c.setPano(b)
  7294.             },
  7295.             d = function(d) {
  7296.                 return a = d, {
  7297.                     getPanorama: b,
  7298.                     setPanorama: c
  7299.                 }
  7300.             };
  7301.         d.$inject = ["$q"], angular.module("ngMap").service("StreetView", d)
  7302.     }(),
  7303.     function() {
  7304.         "use strict";
  7305.         angular.module("ui.validate", []).directive("uiValidate", ["$$uiValidateApplyWatch", "$$uiValidateApplyWatchCollection", function(a, b) {
  7306.             return {
  7307.                 restrict: "A",
  7308.                 require: "ngModel",
  7309.                 link: function(c, d, e, f) {
  7310.                     var g, h = c.$eval(e.uiValidate);
  7311.                     h && (angular.isString(h) && (h = {
  7312.                         validator: h
  7313.                     }), angular.forEach(h, function(a, b) {
  7314.                         g = function(d, e) {
  7315.                             var g = c.$eval(a, {
  7316.                                 $value: d,
  7317.                                 $modelValue: d,
  7318.                                 $viewValue: e,
  7319.                                 $name: f.$name
  7320.                             });
  7321.                             return angular.isObject(g) && angular.isFunction(g.then) ? (g.then(function() {
  7322.                                 f.$setValidity(b, !0)
  7323.                             }, function() {
  7324.                                 f.$setValidity(b, !1)
  7325.                             }), !0) : !!g
  7326.                         }, f.$validators[b] = g
  7327.                     }), e.uiValidateWatch && a(c, f, c.$eval(e.uiValidateWatch), e.uiValidateWatchObjectEquality), e.uiValidateWatchCollection && b(c, f, c.$eval(e.uiValidateWatchCollection)))
  7328.                 }
  7329.             }
  7330.         }]).directive("uiValidateAsync", ["$$uiValidateApplyWatch", "$$uiValidateApplyWatchCollection", "$timeout", "$q", function(a, b, c, d) {
  7331.             return {
  7332.                 restrict: "A",
  7333.                 require: "ngModel",
  7334.                 link: function(c, e, f, g) {
  7335.                     var h, i = c.$eval(f.uiValidateAsync);
  7336.                     i && (angular.isString(i) && (i = {
  7337.                         validatorAsync: i
  7338.                     }), angular.forEach(i, function(a, b) {
  7339.                         h = function(b, e) {
  7340.                             var f = c.$eval(a, {
  7341.                                 $value: b,
  7342.                                 $modelValue: b,
  7343.                                 $viewValue: e,
  7344.                                 $name: g.$name
  7345.                             });
  7346.                             return angular.isObject(f) && angular.isFunction(f.then) ? f : d(function(a, b) {
  7347.                                 setTimeout(function() {
  7348.                                     f ? a() : b()
  7349.                                 }, 0)
  7350.                             })
  7351.                         }, g.$asyncValidators[b] = h
  7352.                     }), f.uiValidateWatch && a(c, g, c.$eval(f.uiValidateWatch), f.uiValidateWatchObjectEquality), f.uiValidateWatchCollection && b(c, g, c.$eval(f.uiValidateWatchCollection)))
  7353.                 }
  7354.             }
  7355.         }]).service("$$uiValidateApplyWatch", function() {
  7356.             return function(a, b, c, d) {
  7357.                 var e = function() {
  7358.                     b.$validate()
  7359.                 };
  7360.                 angular.isString(c) ? a.$watch(c, e, d) : angular.isArray(c) ? angular.forEach(c, function(b) {
  7361.                     a.$watch(b, e, d)
  7362.                 }) : angular.isObject(c) && angular.forEach(c, function(b) {
  7363.                     angular.isString(b) && a.$watch(b, e, d), angular.isArray(b) && angular.forEach(b, function(b) {
  7364.                         a.$watch(b, e, d)
  7365.                     })
  7366.                 })
  7367.             }
  7368.         }).service("$$uiValidateApplyWatchCollection", function() {
  7369.             return function(a, b, c) {
  7370.                 var d = function() {
  7371.                     b.$validate()
  7372.                 };
  7373.                 angular.isString(c) ? a.$watchCollection(c, d) : angular.isArray(c) ? angular.forEach(c, function(b) {
  7374.                     a.$watchCollection(b, d)
  7375.                 }) : angular.isObject(c) && angular.forEach(c, function(b) {
  7376.                     angular.isString(b) && a.$watchCollection(b, d), angular.isArray(b) && angular.forEach(b, function(b) {
  7377.                         a.$watchCollection(b, d)
  7378.                     })
  7379.                 })
  7380.             }
  7381.         })
  7382.     }(), angular.module("staticConfig", []).constant("staticConfig", {
  7383.         workdays: {
  7384.             0: !1,
  7385.             1: !0,
  7386.             2: !0,
  7387.             3: !0,
  7388.             4: !0,
  7389.             5: !0,
  7390.             6: !1,
  7391.             start: "1970-01-01T08:00:00.000Z",
  7392.             end: "1970-01-01T12:00:00.000Z"
  7393.         },
  7394.         hideNextWorkdayMenusUntil: 8,
  7395.         maxMenuQuantity: 10,
  7396.         numberRegex: "^(\\+995)?(5\\d{8}|322\\d{6})$",
  7397.         menuImagePath: "mnu",
  7398.         menuThumbPath: "mnu/t",
  7399.         bucketName: "img.sadili.ge"
  7400.     }),
  7401.     function() {
  7402.         "use strict";
  7403.         angular.module("sdl", ["ngResource", "ngAnimate", "ngMap", "ui.router", "ui.bootstrap", "ui.validate", "angularMoment", "bootstrapLightbox", "staticConfig"]).run(["$rootScope", "$state", "$stateParams", "$http", "config", "zopim", "amMoment", function(a, b, c, d, e, f, g) {
  7404.             e.load(), g.changeLocale("ka"), a.$state = b, a.$stateParams = c, d.get("/api/me").then(function(b) {
  7405.                 a.$applyAsync(function() {
  7406.                     a.user = b.data
  7407.                 })
  7408.             }, function(a) {
  7409.                 console.error("Error getting registered user", a)
  7410.             }), a.isRegistered = function() {
  7411.                 return !!a.user
  7412.             }, f.init()
  7413.         }]).config(["$stateProvider", "$urlRouterProvider", "$locationProvider", "gaEventProvider", function(a, b, c, d) {
  7414.             var e = function(a) {
  7415.                 return [function() {
  7416.                     d.sendEvent(a, "enter"), d.sendPageview()
  7417.                 }]
  7418.             };
  7419.             c.html5Mode(!0), a.state("orders", {
  7420.                 url: "?menus&address",
  7421.                 "abstract": !0,
  7422.                 controller: "OrderCtrl as OC",
  7423.                 templateUrl: "templates/order.html"
  7424.             }).state("home", {
  7425.                 url: "/",
  7426.                 parent: "orders",
  7427.                 templateUrl: "templates/index.html",
  7428.                 onEnter: e("home")
  7429.             }).state("welcome", {
  7430.                 url: "/welcome",
  7431.                 templateUrl: "templates/hello.html",
  7432.                 onEnter: e("welcome")
  7433.             }).state("navbar", {
  7434.                 "abstract": !0,
  7435.                 template: "<ui-view/>"
  7436.             }).state("navbar.how-it-works", {
  7437.                 url: "/how-it-works",
  7438.                 templateUrl: "/templates/navbar/how-it-works.html",
  7439.                 onEnter: e("how-it-works")
  7440.             }).state("navbar.our-kitchen", {
  7441.                 url: "/our-kitchen",
  7442.                 templateUrl: "/templates/navbar/our-kitchen.html",
  7443.                 controller: "KitchenCtlr as KC",
  7444.                 onEnter: e("our-kitchen")
  7445.             }).state("navbar.wrap", {
  7446.                 url: "/wrap",
  7447.                 templateUrl: "/templates/navbar/wrap.html",
  7448.                 onEnter: e("/wrap")
  7449.             }).state("navbar.work-area", {
  7450.                 url: "/work-area",
  7451.                 templateUrl: "/templates/navbar/work-area.html",
  7452.                 onEnter: e("/work-area")
  7453.             }).state("navbar.contact", {
  7454.                 url: "/contact",
  7455.                 templateUrl: "/templates/navbar/contact.html",
  7456.                 controller: ["$scope", function(a) {
  7457.                     this.mail = "mailto:", this.local = "hello", this.domain = "sadili.ge"
  7458.                 }],
  7459.                 controllerAs: "contact",
  7460.                 onEnter: e("/contact")
  7461.             }).state("terms-and-conditions", {
  7462.                 url: "/terms-and-conditions",
  7463.                 templateUrl: "templates/terms-and-conditions-and-privacy-policy.html"
  7464.             }).state("auth", {
  7465.                 "abstract": !0,
  7466.                 parent: "orders",
  7467.                 url: "/auth",
  7468.                 templateUrl: "templates/auth.html",
  7469.                 controller: "AuthCtrl as AUC"
  7470.             }).state("auth.login", {
  7471.                 url: "/login",
  7472.                 controller: "LoginCtrl as LC",
  7473.                 templateUrl: "templates/auth/login.html",
  7474.                 onEnter: e("auth.login")
  7475.             }).state("auth.register", {
  7476.                 url: "/register",
  7477.                 controller: "RegistrationCtrl as RC",
  7478.                 templateUrl: "templates/auth/register.html",
  7479.                 onEnter: e("auth.register")
  7480.             }).state("auth.passwordRecovery", {
  7481.                 url: "/passwordRecovery",
  7482.                 controller: "PasswordRecoveryCtrl",
  7483.                 templateUrl: "templates/auth/password-recovery.html"
  7484.             }).state("auth.passwordUpdated", {
  7485.                 url: "/passwordUpdated",
  7486.                 templateUrl: "templates/auth/password-updated.html"
  7487.             }).state("orders.cancelled", {
  7488.                 url: "/orders/:id/cancelled?error&errorMessage",
  7489.                 templateUrl: "templates/order/cancelled.html",
  7490.                 controller: "OrderCancelledCtrl as OCC"
  7491.             }).state("orders.selectAddress", {
  7492.                 url: "/orders/selectAddress",
  7493.                 controller: "AddressCtrl as AC",
  7494.                 templateUrl: "templates/order/address.html",
  7495.                 onEnter: e("orders.selectAddress")
  7496.             }).state("orders.selectPayment", {
  7497.                 url: "/orders/selectPayment",
  7498.                 controller: "SelectPaymentCtrl as SPC",
  7499.                 templateUrl: "templates/order/cards.html",
  7500.                 onEnter: e("orders.selectPayment")
  7501.             }).state("orders.delivery", {
  7502.                 "abstract": !0,
  7503.                 url: "/orders/:id/delivery",
  7504.                 templateUrl: "templates/order/delivery.html",
  7505.                 controller: "OrderDeliveryCtrl as ODC",
  7506.                 onEnter: e("orders.delivery")
  7507.             }).state("orders.delivery.wait", {
  7508.                 url: "/wait",
  7509.                 templateUrl: "templates/order/delivery/wait.html"
  7510.             }).state("orders.delivery.map", {
  7511.                 url: "/map",
  7512.                 templateUrl: "templates/order/delivery/map.html",
  7513.                 controller: "OrderDeliveryMapCtrl as ODMC"
  7514.             }).state("orders.delivery.finished", {
  7515.                 url: "/finished",
  7516.                 templateUrl: "templates/order/delivery/finished.html"
  7517.             }).state("orderprocessed", {
  7518.                 url: "/orderprocessed/:status",
  7519.                 templateUrl: "templates/orderprocessed.html",
  7520.                 controller: "PaymentCheckCtrl as PCC",
  7521.                 access: {
  7522.                     requiredLogin: !1
  7523.                 }
  7524.             }), b.otherwise("/")
  7525.         }]).config(["LightboxProvider", function(a) {
  7526.             a.templateUrl = "templates/lightbox.html"
  7527.         }])
  7528.     }(),
  7529.     function(a) {
  7530.         "use strict";
  7531.         a.module("sdl").controller("PaymentCheckCtrl", ["$state", "$timeout", "BankResponse", "PaymentService", "Order", function(a, b, c, d, e) {
  7532.             var f = this;
  7533.             f.statuses = {
  7534.                 WAIT: "WAIT",
  7535.                 OK: "OK",
  7536.                 FAILED: "FAILED",
  7537.                 LOADING: "LOADING"
  7538.             }, f.status = f.statuses.LOADING, f.isFailed = function() {
  7539.                 return f.status === f.statuses.FAILED
  7540.             }, f.isOk = function() {
  7541.                 return f.status === f.statuses.OK
  7542.             }, f.isWait = function() {
  7543.                 return f.status === f.statuses.WAIT
  7544.             }, f.isLoading = function() {
  7545.                 return f.status === f.statuses.LOADING
  7546.             }, f.check = function() {
  7547.                 f.status = f.statuses.LOADING, d.checkByBankResponse(c.getBankResponse()).then(function(c) {
  7548.                     switch (c.paymentStatus) {
  7549.                         case e.paymentStatuses.OK:
  7550.                         case e.paymentStatuses.FINISHED:
  7551.                             f.status = f.statuses.OK, a.go("orders.delivery.wait", {
  7552.                                 id: c.order.id
  7553.                             });
  7554.                             break;
  7555.                         case e.paymentStatuses.CANCELLED:
  7556.                             a.go("orders.cancelled", {
  7557.                                 id: c.order.id
  7558.                             });
  7559.                             break;
  7560.                         case e.paymentStatuses.FAILED:
  7561.                             f.status = f.statuses.FAILED, f.error = c.paymentResult.responseStatus, f.errorMessage = c.paymentResult.responseMessage;
  7562.                             break;
  7563.                         default:
  7564.                             b(function() {
  7565.                                 f.status = f.statuses.WAIT
  7566.                             }, 1e4)
  7567.                     }
  7568.                 })["catch"](function(a) {
  7569.                     f.status = f.statuses.WAIT, console.error(a)
  7570.                 })
  7571.             }, c.isFailed() ? (f.status = f.statuses.FAILED, f.error = c.getError(), d.failByBankResponse(c.getBankResponse()).then(function(a) {
  7572.                 console.log(a)
  7573.             })["catch"](function(a) {
  7574.                 console.error(a)
  7575.             })) : f.check()
  7576.         }])
  7577.     }(window.angular),
  7578.     function(a) {
  7579.         "use strict";
  7580.         a.module("sdl").controller("SelectPaymentCtrl", ["$scope", "$state", "$uibModal", "$timeout", "PaymentRedirect", "PaymentMethod", "SavedPayment", "Order", function(a, b, c, d, e, f, g, h) {
  7581.             var i = this,
  7582.                 j = 100;
  7583.             i.paymentMethods = f.query(function() {
  7584.                 i.paymentMethods = i.paymentMethods.sort(f.sortByPriority), d(i.selectDefault, j)
  7585.             }), i.savedPayments = g.query(function() {
  7586.                 i.savedPayments = i.savedPayments.sort(g.sortByDate), d(i.selectDefault, j)
  7587.             }), i.selectPayment = function(a) {
  7588.                 i.selectedPayment = a
  7589.             }, i.selectDefault = function() {
  7590.                 var a = [];
  7591.                 i.savedPayments.length && (a = a.concat(i.savedPayments.filter(function(a) {
  7592.                     return !a.isExpired()
  7593.                 }))), i.paymentMethods.length && (a = a.concat(i.paymentMethods)), a.length && i.selectPayment(a[0].getFieldsForOrder())
  7594.             }, i.placeOrder = function() {
  7595.                 a.order.paymentStrategyName = i.selectedPayment.paymentStrategyName, a.order.paymentOptions = i.selectedPayment.paymentOptions, h.create(a.order, function(a) {
  7596.                     console.log("Order create result", a);
  7597.                     var b = a.paymentOptions,
  7598.                         c = a.paymentResult;
  7599.                     return c && c.paymentStatus === h.paymentStatuses.FAILED ? (i.showError = !0, i.error = c.responseStatus, i.errorMessage = c.responseMessage, void(i.paymentFailed = !0)) : void e.redirect(b)
  7600.                 }, function(a) {
  7601.                     i.error = a.data && a.data.message || a.statusText || a.status || "Unknown", i.showError = !0, console.error(a)
  7602.                 })
  7603.             }, i.dismissError = function() {
  7604.                 i.showError = !1
  7605.             }, i.removeSavedPayment = function(a) {
  7606.                 var b = c.open({
  7607.                     animation: !0,
  7608.                     templateUrl: "templates/directives/card-delete.html",
  7609.                     size: "lg",
  7610.                     resolve: {
  7611.                         card: function() {
  7612.                             return a
  7613.                         }
  7614.                     },
  7615.                     controller: ["card", function(a) {
  7616.                         this.card = a
  7617.                     }],
  7618.                     controllerAs: "MC"
  7619.                 });
  7620.                 b.result.then(function(b) {
  7621.                     b && a.$delete(function() {
  7622.                         i.savedPayments.splice(i.savedPayments.indexOf(a), 1)
  7623.                     }, function(a) {
  7624.                         console.error(a)
  7625.                     })
  7626.                 })
  7627.             }, i.renewSavedPayment = function(a) {
  7628.                 i.selectedPayment = {
  7629.                     paymentStrategyName: a.createdByStrategy
  7630.                 }, a.$delete(function() {
  7631.                     i.placeOrder()
  7632.                 }, function(a) {
  7633.                     console.error(a)
  7634.                 })
  7635.             }
  7636.         }])
  7637.     }(window.angular),
  7638.     function(a) {
  7639.         "use strict";
  7640.         a.module("sdl").factory("PaymentMethod", ["$resource", function(a) {
  7641.             var b = a("/clientapi/payments/getStrategies");
  7642.             return b.sortByPriority = function(a, b) {
  7643.                 return a.priority > b.priority ? 1 : -1
  7644.             }, b.prototype.getFieldsForOrder = function() {
  7645.                 return this.fieldsForOrder = this.fieldsForOrder || {
  7646.                     paymentStrategyName: this.name,
  7647.                     paymentOptions: {}
  7648.                 }, this.fieldsForOrder
  7649.             }, b
  7650.         }])
  7651.     }(window.angular),
  7652.     function(a) {
  7653.         "use strict";
  7654.         a.module("sdl").factory("SavedPayment", ["$resource", "CardTypeService", function(a, b) {
  7655.             var c = a("/clientapi/clients/my/cards/:id", {
  7656.                 id: "@id"
  7657.             }, {
  7658.                 "delete": {
  7659.                     method: "delete",
  7660.                     params: {
  7661.                         strategyName: "@strategyName"
  7662.                     }
  7663.                 }
  7664.             });
  7665.             return c.sortByDate = function(a, b) {
  7666.                 return a.createdAt > b.createdAt ? 1 : -1
  7667.             }, c.prototype.getFieldsForOrder = function() {
  7668.                 return this.fieldsForOrder = this.fieldsForOrder || {
  7669.                     paymentStrategyName: this.strategyName,
  7670.                     paymentOptions: {
  7671.                         cardId: this.id
  7672.                     }
  7673.                 }, this.fieldsForOrder
  7674.             }, c.prototype.getType = function() {
  7675.                 return this.type = this.type || b.getCardType(this.cardNumber), this.type
  7676.             }, c.prototype.isExpired = function() {
  7677.                 return moment(this.savingCodeExpire).add(1, "months").isBefore(moment())
  7678.             }, c.prototype.getExpireDate = function() {
  7679.                 return this.cachedExpireDate ? this.cachedExpireDate : (this.cachedExpireDate = moment(this.savingCodeExpire).add(1, "months").toDate(), this.cachedExpireDate)
  7680.             }, c
  7681.         }])
  7682.     }(window.angular),
  7683.     function() {
  7684.         "use strict";
  7685.         angular.module("sdl").controller("WorkdaysController", ["$scope", "$q", "UpdateWorkdayScope", "staticConfig", function(a, b, c, d) {
  7686.             angular.extend(a, {
  7687.                 thumbPath: ["/", d.bucketName, d.menuThumbPath, ""].join("/"),
  7688.                 imgPath: ["/", d.bucketName, d.menuImagePath, ""].join("/"),
  7689.                 getWorkdays: c
  7690.             }), a.getWorkdays(a)
  7691.         }]).controller("AuthCtrl", ["$scope", "staticConfig", "FlashMessage", function(a, b, c) {
  7692.             var d = this;
  7693.             d.numberRegex = new RegExp(b.numberRegex), d.formErrors = c.getFormErrors(), a.formSubmit = function(b, c) {
  7694.                 var d = angular.element(document.getElementById(b)),
  7695.                     e = d.attr("ng-action");
  7696.                 c = c || a.$eval(b), d.attr("action", e), c.$valid ? d[0].submit() : d.removeAttr("action")
  7697.             }
  7698.         }]).controller("OrderCtrl", ["$scope", "$stateParams", "Order", "b64", function(a, b, c, d) {
  7699.             a.order = c.build(), b.menus && (a.order.menus = d.b64_to_obj(b.menus), a.hashedMenus = b.menus, a.$watch("order.menus", function(b) {
  7700.                 a.hashedMenus = d.obj_to_b64(b)
  7701.             }, !0)), b.address && (a.order.address = b.address), a.makeOrder = function() {
  7702.                 window.location = "/initOrder?menus=" + d.obj_to_b64(a.order.menus)
  7703.             }, a.orderHasMainMenus = function() {
  7704.                 return a.order && a.menus && a.order.hasMainMenus(a.menus)
  7705.             }, a.getWorkdays(a)
  7706.         }]).controller("MainCtrl", ["$scope", "$state", "$filter", "Lightbox", "ResponsiveDetection", function(a, b, c, d, e) {
  7707.             a.isCollapsed = !1;
  7708.             c("sortMenus")(a.menus).map(function(b) {
  7709.                 return {
  7710.                     url: b.picture ? a.imgPath + b.picture : "/images/nopic.gif",
  7711.                     caption: b.name
  7712.                 }
  7713.             });
  7714.             a.openLightboxModal = function(a, b, f) {
  7715.                 if ("xs" !== e.getBreakpoint()) {
  7716.                     var g = c("sortMenus")(b).map(function(a) {
  7717.                         return {
  7718.                             url: a.picture ? f + a.picture : "/images/nopic.gif",
  7719.                             caption: a.name
  7720.                         }
  7721.                     });
  7722.                     d.openModal(g, a)
  7723.                 }
  7724.             }, a.hideNavbarBasedOnState = function() {
  7725.                 return b.includes("orders.selectAddress") || b.includes("orders.delivery") || b.includes("orders.selectPayment") || b.includes("orderprocessed") || b.includes("auth") || b.includes("welcome") || b.includes("orders.cancelled")
  7726.             }
  7727.         }]).controller("LoginCtrl", ["$scope", "$window", function(a) {
  7728.             a.formSubmit = function(b) {
  7729.                 return a.$parent.formSubmit(b, a.$eval(b))
  7730.             }
  7731.         }]).controller("RegistrationCtrl", ["$scope", function(a) {
  7732.             a.formSubmit = function(b) {
  7733.                 return a.$parent.formSubmit(b, a.$eval(b))
  7734.             }
  7735.         }]).controller("PasswordRecoveryCtrl", ["$scope", "$state", "$http", function(a, b, c) {
  7736.             a.sendCode = function() {
  7737.                 c.post("/auth/resetCode", {
  7738.                     phone: a.phone
  7739.                 }).then(function() {
  7740.                     a.codeSent = !0, a.numberNotFound = !1, a.smsSendError = !1, a.smsAlreadySent = !1
  7741.                 })["catch"](function(b) {
  7742.                     b.status && 404 === b.status ? (a.numberNotFound = !0, a.smsAlreadySent = !1) : 429 === b.status ? (a.smsAlreadySent = !0, a.codeSent = !0) : (a.smsSendError = !0, a.smsAlreadySent = !1), console.error(b)
  7743.                 })
  7744.             }, a.changePassword = function() {
  7745.                 c.put("/auth/password", {
  7746.                     phone: a.phone,
  7747.                     password: a.password,
  7748.                     passwordConfirm: a.passwordConfirmation,
  7749.                     key: a.smsCode
  7750.                 }).then(function() {
  7751.                     var b = document.createElement("form"),
  7752.                         c = document.createElement("input"),
  7753.                         d = document.createElement("input");
  7754.                     b.action = "/auth/login?next=/auth/passwordUpdated", b.method = "post", c.name = "phone", c.value = a.phone, c.type = "hidden", d.name = "password", d.value = a.password, d.type = "hidden", b.appendChild(c), b.appendChild(d), document.body.appendChild(b), b.submit()
  7755.                 })["catch"](function(b) {
  7756.                     b.status && 404 === b.status && (a.invalidCode = !0), console.error(b)
  7757.                 })
  7758.             }
  7759.         }]).controller("AddressCtrl", ["$scope", "$state", "Address", function(a, b, c) {
  7760.             a.userAddresses = [], c.query(function(b) {
  7761.                 a.userAddresses = a.userAddresses.concat(b), 1 === a.userAddresses.length && (a.order.address = a.userAddresses[0], a.userAddresses[0].selected = !0), a.addAddress(), 1 === a.userAddresses.length && (a.order.address = a.userAddresses[0], a.userAddresses[0].open = !0, a.userAddresses[0].selected = !0, a.userAddresses[0].isDefault = !0)
  7762.             }), a.addAddress = function(b) {
  7763.                 a.userAddresses.push(b || new c({
  7764.                     "new": !0,
  7765.                     geoName: "სხვა მისამართი"
  7766.                 }))
  7767.             }, a.removeAddress = function(b) {
  7768.                 b.id && b.$remove(), a.userAddresses.splice(a.userAddresses.indexOf(b), 1)
  7769.             }, a.saveAddress = function(b) {
  7770.                 b.id ? b.$save().then(function() {
  7771.                     b.genEdited(), b.selected = !0, a.order.address = b
  7772.                 })["catch"](function(a) {
  7773.                     console.error("Fail Saving Adress", a)
  7774.                 }) : b.$post().then(function() {
  7775.                     b.genEdited(), b.selected = !0, a.order.address = b
  7776.                 })["catch"](function(a) {
  7777.                     console.error("Fail adding Adress", a)
  7778.                 })
  7779.             }, a.switchOnWarnings = function() {
  7780.                 var b = function() {
  7781.                     a.order.address.showWarnings = "yes"
  7782.                 };
  7783.                 a.$$phase ? a.$applyAsync(b) : a.$apply(b)
  7784.             }, a.switchOffWarnings = function() {
  7785.                 var b = 1e3;
  7786.                 setTimeout(function() {
  7787.                     a.$applyAsync(function() {
  7788.                         a.order.address.showWarnings = !1
  7789.                     })
  7790.                 }, b)
  7791.             }, a.addressOkay = function() {
  7792.                 var b = a.order.address;
  7793.                 return b ? b.open ? Boolean(b.edited && !b.edited.error && b.edited.latlng) : Boolean(b.geoName && b.lat) : !1
  7794.             }, a.proceed = function() {
  7795.                 var c = a.order.address;
  7796.                 if (!a.order.isEmpty()) {
  7797.                     if (!a.addressOkay()) return void a.switchOnWarnings();
  7798.                     c.open && c.edited && (c.lat = c.edited.latlng.lat, c.lng = c.edited.latlng.lng, c.geoName = c.edited.geoName, c.isDefault = c.edited.isDefault, a.saveAddress(c)), b.go("orders.selectPayment", {
  7799.                         address: c.id
  7800.                     })
  7801.                 }
  7802.             }
  7803.         }]).controller("OrderCancelledCtrl", ["$state", "$stateParams", function(a, b) {
  7804.             var c = this;
  7805.             c.error = b.error, c.errorMessage = b.errorMessage
  7806.         }]).controller("OrderDeliveryCtrl", ["$scope", "$state", "$stateParams", "$anchorScroll", "Order", "OrderService", function(a, b, c, d, e, f) {
  7807.             var g = function(d) {
  7808.                     a.$applyAsync(function() {
  7809.                         switch (angular.extend(a.order, d), d.deliveryStatus) {
  7810.                             case e.deliveryStatuses.PROCESSING:
  7811.                             case e.deliveryStatuses.DELIVERED:
  7812.                                 "orders.delivery.map" === b.current.name && "DELIVERED" !== d.deliveryStatuses ? b.transitionTo("orders.delivery.map", c, {
  7813.                                     reload: "orders.delivery.map",
  7814.                                     inherit: !0,
  7815.                                     notify: !0
  7816.                                 }) : b.go("orders.delivery.map");
  7817.                                 break;
  7818.                             case e.deliveryStatuses.READY:
  7819.                                 b.go("orders.delivery.wait");
  7820.                                 break;
  7821.                             case e.deliveryStatuses.FINISHED:
  7822.                                 b.go("orders.delivery.finished");
  7823.                                 break;
  7824.                             case e.deliveryStatuses.CANCELLED:
  7825.                                 b.go("orders.cancelled", c)
  7826.                         }
  7827.                         a.order = d
  7828.                     })
  7829.                 },
  7830.                 h = function() {
  7831.                     io.socket.get("/clientapi/orders/" + encodeURIComponent(c.id) + "/subscribe"), i()
  7832.                 },
  7833.                 i = function() {
  7834.                     e.get({
  7835.                         orderId: c.id
  7836.                     }, function(a) {
  7837.                         g(a)
  7838.                     }, function(a) {
  7839.                         console.error(a), confirm("დაფიქსირდა შეცდომა, გვერდის გადასატვირთად დააჭირეთ OK-ს") && window.location.reload()
  7840.                     })
  7841.                 };
  7842.             a.order = e.build(), a.countPrice = f.countPrice, c.id ? (io.socket.on("order", function(a) {
  7843.                 g(a.data)
  7844.             }), h(), io.socket.on("connect", h), d("order-wait")) : b.go("home"), a.$on("$destroy", function() {
  7845.                 a.order && io.socket.get("/clientapi/orders/" + encodeURIComponent(a.order.id) + "/unsubscribe")
  7846.             })
  7847.         }]).controller("OrderDeliveryMapCtrl", ["$scope", "$anchorScroll", function(a, b) {
  7848.             var c, d = function() {
  7849.                 var b, c = new google.maps.LatLngBounds;
  7850.                 a.driver && a.driver.location && (b = a.driver.location.coordinates, c.extend(new google.maps.LatLng(b[1], b[0]))), a.order && a.order.lat && c.extend(new google.maps.LatLng(a.order.lat, a.order.lng)), a.map && a.map.fitBounds(c)
  7851.             };
  7852.             c = function() {
  7853.                 a.order && a.order.driver && (a.driverId = a.order.driver.id || a.order.driver, io.socket.get("/clientapi/drivers/" + encodeURIComponent(a.driverId) + "/subscribe", function(c, e) {
  7854.                     c && a.$applyAsync(function() {
  7855.                         a.driver = c, b("delivery-map"), d()
  7856.                     })
  7857.                 }))
  7858.             }, io.socket.on("driverworkday", function(b) {
  7859.                 b.data && a.$applyAsync(function() {
  7860.                     a.driver ? angular.extend(a.driver, b.data) : a.driver = b.data
  7861.                 })
  7862.             }), io.socket.on("connect", c), c(), a.$on("$destroy", function() {
  7863.                 a.driverId && io.socket.get("/clientapi/drivers/" + encodeURIComponent(a.driverId) + "/unsubscribe")
  7864.             })
  7865.         }]).controller("KitchenCtlr", function() {
  7866.             var a = this,
  7867.                 b = a.slides = [],
  7868.                 c = 6;
  7869.             a.addSlide = function() {
  7870.                 b.push({
  7871.                     image: "../images/kitchen/kitchen" + d + ".jpg",
  7872.                     index: d
  7873.                 })
  7874.             };
  7875.             for (var d = 0; c > d; d++) a.addSlide()
  7876.         }).controller("PaymentSuccessCtrl", ["$scope", "$stateParams", "$state", "$http", function(a, b, c, d) {
  7877.             var e = decodeURIComponent(b.trans_id);
  7878.             d.get("/api/transactions/checkStatus/" + encodeURIComponent(e)).then(function(a) {
  7879.                 c.go("orders.delivery.wait", {
  7880.                     id: a.data.orderId
  7881.                 })
  7882.             }, function(a, b) {
  7883.                 console.error("ERROR Geting transaction status", a), c.go("orderprocessed.fail", {
  7884.                     trans_id: e,
  7885.                     error: "TRANSACTION_FAILED"
  7886.                 })
  7887.             })
  7888.         }]).controller("PaymentFailCtrl", ["$scope", "$stateParams", "$http", function(a, b, c) {
  7889.             var d = this,
  7890.                 e = decodeURIComponent(b.trans_id),
  7891.                 f = {
  7892.                     CANNOT_CREATE_ORDER: "შეკვეთის მიღება ვერ áƒ›áƒáƒ®áƒ”რხდა",
  7893.                     TRANSACTION_FAILED: "ტრანზაქცია ვერ áƒ¨áƒ”სრულდა",
  7894.                     ORDER_CANCELLED: "შეკვეთა გაუქმებულია",
  7895.                     "default": "ბანკის შეცდომა"
  7896.                 },
  7897.                 g = f[b.error || "default"];
  7898.             d.errorMessage = g, b.trans_id && c.get("/api/transactions/fail/" + encodeURIComponent(e)).then(function(a) {
  7899.                 d.errorStatus = a.data && a.data.fail_log && a.data.fail_log.status, d.errorMessage = a.data && a.data.fail_log && a.data.fail_log.message || g, console.error("Transaction faliled", a.data)
  7900.             }, function(a, b) {
  7901.                 d.errorStatus = res.data && res.data.status, d.errorMessage = res.statusText && res.statusText || g, console.error("Failed to check why transaction failed", a, b)
  7902.             })
  7903.         }]).controller("OrderedMenusCtrl", ["$scope", function(a) {
  7904.             var b = this;
  7905.             b.sortByMenuQuantity = function(b) {
  7906.                 return a.order.menus[b.menu] || 0
  7907.             }
  7908.         }])
  7909.     }(),
  7910.     function() {
  7911.         "use strict";
  7912.         angular.module("sdl").directive("sdlQuantity", function() {
  7913.             return {
  7914.                 restrict: "AE",
  7915.                 scope: {
  7916.                     min: "=",
  7917.                     max: "=",
  7918.                     value: "="
  7919.                 },
  7920.                 template: 'რაოდენობა:<form class="d-i-b"><button class="btn btn-default btn-number" ng-click="value = value - 1" ng-disabled="value <= vm.min || !value"><i class="icon-minus fs-md"></i></button><input name="quant[0]" class="form-control input-number text-center vertical-middle" min="1" type="number" ng-model="value"><button class="btn btn-default btn-number" ng-click="value = value + 1" ng-disabled="value >= vm.max"><i class="icon-plus fs-md"></i></button></form>',
  7921.                 controller: ["$scope", "staticConfig", function(a, b) {
  7922.                     var c = this;
  7923.                     c.max = Math.min(a.max, b.maxMenuQuantity)
  7924.                 }],
  7925.                 controllerAs: "vm"
  7926.             }
  7927.         }).directive("sdlAddressQuantity", function() {
  7928.             return {
  7929.                 restrict: "AE",
  7930.                 scope: {
  7931.                     min: "=",
  7932.                     max: "=",
  7933.                     value: "="
  7934.                 },
  7935.                 template: '<form><button class="btn btn-default btn-number" ng-click="incValue(-1)" ng-disabled="value <= vm.min || !value"><i class="icon-minus fs-md text-gray"></i></button><span name="quant[0]" class="d-i-b vertical-middle padding-horizontal-xs fs-xlg text-dark" min="1" max="{{ vm.max }}" type="number" ng-model="value"> {{value || 0}}</span><button class="btn btn-default btn-number" ng-click="incValue(1)" ng-disabled="value >= vm.max"><i class="icon-plus fs-md text-gray"></i></button></form>',
  7936.                 controller: ["$scope", "staticConfig", function(a, b) {
  7937.                     var c = this;
  7938.                     c.max = Math.min(a.max, b.maxMenuQuantity), a.incValue = function(b) {
  7939.                         a.$applyAsync(function() {
  7940.                             a.value = (a.value || 0) + b
  7941.                         })
  7942.                     }
  7943.                 }],
  7944.                 controllerAs: "vm"
  7945.             }
  7946.         }).directive("sdlGallery", function() {
  7947.             return {
  7948.                 restrict: "EA",
  7949.                 scope: {
  7950.                     slides: "=sdlGallery"
  7951.                 },
  7952.                 templateUrl: "/templates/directives/sdl-gallery.html",
  7953.                 controller: ["$scope", "$element", "$attrs", function(a, b, c) {
  7954.                     var d = b[0].getElementsByTagName("thumbs-slider-container")[0],
  7955.                         e = d.getElementsByTagName("thumbs-slider")[0];
  7956.                     angular.extend(a, {
  7957.                         setActive: function(b) {
  7958.                             a.slides.forEach(function(a) {
  7959.                                 a.active = a.index === b
  7960.                             })
  7961.                         },
  7962.                         moveRight: function() {
  7963.                             var a = d.clientWidth,
  7964.                                 b = e.clientWidth,
  7965.                                 c = parseInt(e.style.left),
  7966.                                 f = e.children[0].clientWidth,
  7967.                                 g = b - a + c,
  7968.                                 h = c - a;
  7969.                             c = g >= a ? (h / f | 0) * f : c - g, e.style.left = c + "px"
  7970.                         },
  7971.                         moveleft: function() {
  7972.                             var a = d.clientWidth,
  7973.                                 b = parseInt(e.style.left),
  7974.                                 c = e.children[0].clientWidth,
  7975.                                 f = b + a;
  7976.                             b = -b >= a ? (f / c | 0) * c : 0, e.style.left = b + "px"
  7977.                         },
  7978.                         isHidden: function() {
  7979.                             var a = d.clientWidth,
  7980.                                 b = e.clientWidth;
  7981.                             return a > b
  7982.                         },
  7983.                         isNotActive: {
  7984.                             left: function() {
  7985.                                 var a = parseInt(e.style.left);
  7986.                                 return a >= 0
  7987.                             },
  7988.                             right: function() {
  7989.                                 var a = parseInt(e.style.left),
  7990.                                     b = d.clientWidth,
  7991.                                     c = e.clientWidth;
  7992.                                 return -(c - b) >= a
  7993.                             }
  7994.                         }
  7995.                     })
  7996.                 }]
  7997.             }
  7998.         }).directive("orderPrice", function() {
  7999.             return {
  8000.                 restrict: "AE",
  8001.                 scope: {
  8002.                     orderPrice: "=",
  8003.                     menus: "=",
  8004.                     price: "&"
  8005.                 },
  8006.                 template: '{{price}}<i class="icon-lari padding-horizontal-xxs fs-md valign-sm"></i>',
  8007.                 link: function(a, b, c) {
  8008.                     var d = {},
  8009.                         e = {},
  8010.                         f = 0,
  8011.                         g = function() {
  8012.                             d.recalculatemenus(e), f = 0;
  8013.                             var b = {};
  8014.                             Array.isArray(d.menus) ? d.menus.forEach(function(a) {
  8015.                                 b[a.menu] = a.quantity
  8016.                             }) : b = d.menus, d.menus && Array.isArray(e) && e.filter(function(a) {
  8017.                                 return !!b[a.menu]
  8018.                             }).forEach(function(a) {
  8019.                                 f += a.price * b[a.menu]
  8020.                             }), a.$applyAsync(function() {
  8021.                                 a.price = f / 100
  8022.                             })
  8023.                         };
  8024.                     a.$watch("orderPrice", function(a) {
  8025.                         d = a, g()
  8026.                     }, !0), a.$watchCollection("menus", function(a) {
  8027.                         e = a, g()
  8028.                     })
  8029.                 }
  8030.             }
  8031.         }).directive("flash", ["FlashMessage", function(a) {
  8032.             return {
  8033.                 require: "ngModel",
  8034.                 scope: {
  8035.                     ngModel: "="
  8036.                 },
  8037.                 link: function(b, c, d, e) {
  8038.                     e.$validators.flash = function(b, c) {
  8039.                         var f = a.getError(d.name);
  8040.                         return f && e.$pristine ? (e.$error.message = f, !1) : (delete e.$error.message, !0)
  8041.                     };
  8042.                     var f = a.getValue(d.name);
  8043.                     f && (e.$modelValue = f, b.ngModel = f)
  8044.                 }
  8045.             }
  8046.         }]).directive("uniqPhone", ["Customer", function(a) {
  8047.             return {
  8048.                 require: "ngModel",
  8049.                 link: function(b, c, d, e) {
  8050.                     e.$asyncValidators.uniqPhone = function(b) {
  8051.                         return a.hasUniquePhone(b)
  8052.                     }
  8053.                 }
  8054.             }
  8055.         }]).directive("addressMap", function() {
  8056.             return {
  8057.                 restrict: "E",
  8058.                 scope: {
  8059.                     address: "="
  8060.                 },
  8061.                 template: '<ng-map style="height: 400px !important;" default-style="false"></ng-map><div class="pinpoint"></div><button class="myLocation no-border z1" ng-click="locate()"></button>',
  8062.                 controller: ["$scope", "$q", "geoCode", "Settings", "GeoJsonHelper", function(a, b, c, d, e) {
  8063.                     var f = function(b) {
  8064.                             var c = new google.maps.LatLng(b.lat, b.lng),
  8065.                                 d = !0;
  8066.                             return a.restrict.polygons.length ? (a.restrict.polygons.forEach(function(a) {
  8067.                                 google.maps.geometry.poly.containsLocation(c, a) && (d = !1)
  8068.                             }), d) : !1
  8069.                         },
  8070.                         g = function(b) {
  8071.                             a.$applyAsync(function() {
  8072.                                 a.address.error = b
  8073.                             })
  8074.                         },
  8075.                         h = function(b) {
  8076.                             a.$applyAsync(function() {
  8077.                                 a.address.geoName = b
  8078.                             })
  8079.                         },
  8080.                         i = function() {
  8081.                             return a.map.getZoom() < a.restrict.zoom ? (g("დააზუსტეთ მისამართი (Zoom in)"), !1) : !0
  8082.                         },
  8083.                         j = function() {
  8084.                             a.address.latlng.lat = a.map.center.lat(), a.address.latlng.lng = a.map.center.lng(), f(a.address.latlng) ? g("მხოლოდ თბილისის ფარგლებში") : (g(!1), c.reverse({
  8085.                                 lat: a.address.latlng.lat,
  8086.                                 lng: a.address.latlng.lng
  8087.                             }, function(b) {
  8088.                                 i() && !f(a.address.latlng) && g(!1), h(b ? b : a.address.latlng.lat + "," + a.address.latlng.lng)
  8089.                             }))
  8090.                         },
  8091.                         k = function() {
  8092.                             i() && j()
  8093.                         };
  8094.                     a.locate = function() {
  8095.                         navigator.geolocation.getCurrentPosition(function(b) {
  8096.                             a.$apply(function() {
  8097.                                 a.address.latlng.lat = b.coords.latitude, a.address.latlng.lng = b.coords.longitude, a.map.setCenter(a.address.latlng), a.map.setZoom(a.restrict.zoom)
  8098.                             })
  8099.                         })
  8100.                     };
  8101.                     var l = b.defer(),
  8102.                         m = b.defer();
  8103.                     b.all([l.promise, m.promise]).then(function() {
  8104.                         a.map.setCenter(a.address.latlng), a.map.setZoom(a.address.zoom), a.map.addListener("center_changed", k), a.map.addListener("zoom_changed", k);
  8105.                         for (var b in a.restrict.polygons) a.restrict.polygons[b] = new google.maps.Polygon(a.restrict.polygons[b]), a.restrict.polygons[b].setMap(a.map);
  8106.                         a.address["new"] && a.locate(), k()
  8107.                     }), d.getDefault().then(function(b) {
  8108.                         a.restrict = {
  8109.                             zoom: 18
  8110.                         };
  8111.                         var c = e.multiPolyToPolyArray(b.servingArea);
  8112.                         a.restrict.polygons = c.map(function(a) {
  8113.                             return {
  8114.                                 paths: a,
  8115.                                 fillColor: "#440044",
  8116.                                 fillOpacity: .1,
  8117.                                 strokeColor: "#550011",
  8118.                                 strokeOpacity: .7,
  8119.                                 strokeWeight: 2
  8120.                             }
  8121.                         }), l.resolve()
  8122.                     }), a.$on("mapInitialized", function(b, c) {
  8123.                         a.map = c, m.resolve(c)
  8124.                     })
  8125.                 }]
  8126.             }
  8127.         }).directive("addressRow", function() {
  8128.             return {
  8129.                 restrict: "EA",
  8130.                 scope: {
  8131.                     address: "=",
  8132.                     selectedAddress: "="
  8133.                 },
  8134.                 templateUrl: "/templates/directives/address-row.html",
  8135.                 controller: ["$scope", function(a) {
  8136.                     a.randomImage = 6 * Math.random() | 0, a.commitAddress = function() {
  8137.                         return a.address.edited.error ? !1 : (a.address["new"] && a.addAddress(), a.address.lat = a.address.edited.latlng.lat, a.address.lng = a.address.edited.latlng.lng, a.address.geoName = a.address.edited.geoName, a.address.isDefault = a.address.edited.isDefault, a.address["new"] = !1, a.address.selected = !0, a.selectedAddress = a.address, a.saveAddress(), !0)
  8138.                     }, a.resetAddress = function() {
  8139.                         return a.address.edited = {
  8140.                             latlng: {
  8141.                                 lat: a.address.lat || 41.72554013514525,
  8142.                                 lng: a.address.lng || 44.74450071978755
  8143.                             },
  8144.                             zoom: 18,
  8145.                             isDefault: a.address.isDefault,
  8146.                             geoName: a.address.geoName,
  8147.                             "new": a.address["new"],
  8148.                             id: a.address.id || "new"
  8149.                         }, !0
  8150.                     }, a.resetAddress(), a.addAddress = function() {
  8151.                         a.$parent.addAddress()
  8152.                     }, a.removeAddress = function() {
  8153.                         a.$parent.removeAddress(a.address), a.address.selected && (a.selectedAddress.geoName = null)
  8154.                     }, a.saveAddress = function() {
  8155.                         a.$parent.saveAddress(a.address)
  8156.                     }, a.selectAddress = function() {
  8157.                         a.address["new"] && (a.address.open = !0), a.address.selected = !0, a.selectedAddress = a.address
  8158.                     }, a.toggleOpen = function(b) {
  8159.                         a.address.open = !a.address.open, b && b.stopPropagation()
  8160.                     }, a.address.selected && (a.selectedAddress = a.address), a.address.isDefault && a.selectAddress()
  8161.                 }]
  8162.             }
  8163.         }).directive("autoFillSync", function(a) {
  8164.             return {
  8165.                 require: "ngModel",
  8166.                 link: function(b, c, d, e) {
  8167.                     var f = c.val();
  8168.                     a(function() {
  8169.                         var a = c.val();
  8170.                         e.$pristine && f !== a && e.$setViewValue(a)
  8171.                     }, 500)
  8172.                 }
  8173.             }
  8174.         }).directive("workArea", function() {
  8175.             return {
  8176.                 restrict: "AE",
  8177.                 scope: {
  8178.                     address: "="
  8179.                 },
  8180.                 template: '<ng-map class="padding-msm-right-xlg" style="height: 600px !important;" center="41.72793381699124, 44.76327871692967" zoom="13" default-style="false"><shape  paths="{{polygon}}" name="polygon" stroke-color="#f9d200" stroke-opacity="1" stroke-weight="2" fill-color="#f9d200" fill-opacity="0.6" ></shape>',
  8181.                 controller: ["$scope", "$q", "Settings", "GeoJsonHelper", function(a, b, c, d) {
  8182.                     c.getDefault().then(function(b) {
  8183.                         a.polygon = d.multiPolyToPolyArray(b.servingArea)[0]
  8184.                     })
  8185.                 }]
  8186.             }
  8187.         })
  8188.     }(),
  8189.     function() {
  8190.         "use strict";
  8191.         angular.module("sdl").factory("Menu", ["$resource", function(a) {
  8192.             var b = a("/api/menus", {}, {
  8193.                 get: {
  8194.                     method: "GET",
  8195.                     isArray: !0
  8196.                 }
  8197.             });
  8198.             return angular.extend(b.prototype, {}), b
  8199.         }]).factory("Address", ["$resource", function(a) {
  8200.             var b = [44.74450071978755, 41.72554013514525],
  8201.                 c = 18,
  8202.                 d = a("/api/me/address/:addressId", {
  8203.                     addressId: "@id"
  8204.                 }, {
  8205.                     save: {
  8206.                         method: "PUT"
  8207.                     },
  8208.                     post: {
  8209.                         method: "POST"
  8210.                     }
  8211.                 });
  8212.             return d.prototype.genEdited = function() {
  8213.                 this.edited = {
  8214.                     latlng: {
  8215.                         lat: this.lat || b[1],
  8216.                         lng: this.lng || b[0]
  8217.                     },
  8218.                     zoom: c,
  8219.                     isDefault: this.isDefault,
  8220.                     geoName: this.geoName,
  8221.                     "new": this["new"],
  8222.                     id: this.id || "new"
  8223.                 }
  8224.             }, d
  8225.         }]).factory("Workday", ["$resource", function(a) {
  8226.             return a("/api/workdays/:workdayId", {
  8227.                 workdayId: "@id"
  8228.             }, {})
  8229.         }]).factory("Customer", ["$http", "$q", function(a, b) {
  8230.             return {
  8231.                 hasUniquePhone: function(c) {
  8232.                     var d = b.defer();
  8233.                     return a.get("/api/customer/checkPhone/" + c).then(function(a) {
  8234.                         d.reject(a.body)
  8235.                     }, function(a, b) {
  8236.                         d.resolve()
  8237.                     }), d.promise
  8238.                 }
  8239.             }
  8240.         }]).factory("Settings", ["$http", function(a) {
  8241.             return {
  8242.                 getDefault: function() {
  8243.                     return a.get("/api/settings/default").then(function(a) {
  8244.                         return a.data
  8245.                     })
  8246.                 }
  8247.             }
  8248.         }]).factory("Order", ["$resource", "staticConfig", function(a, b) {
  8249.             var c = a("/clientapi/orders/:orderId", {
  8250.                 orderId: "@id"
  8251.             }, {
  8252.                 create: {
  8253.                     method: "POST"
  8254.                 }
  8255.             });
  8256.             return c.deliveryStatuses = {
  8257.                 INIT: "INIT",
  8258.                 READY: "READY",
  8259.                 PROCESSING: "PROCESSING",
  8260.                 CANCELLED: "CANCELLED",
  8261.                 DELIVERED: "DELIVERED",
  8262.                 FINISHED: "FINISHED"
  8263.             }, c.paymentStatuses = {
  8264.                 OK: "OK",
  8265.                 FAILED: "FAILED",
  8266.                 WAIT: "WAIT",
  8267.                 CANCELLED: "CANCELLED",
  8268.                 REFUNDED: "REFUNDED",
  8269.                 FINISHED: "FINISHED"
  8270.             }, angular.extend(c.prototype, {
  8271.                 isEmpty: function() {
  8272.                     var a;
  8273.                     for (a in this.menus)
  8274.                         if (a && this.menus.hasOwnProperty(a) && this.menus[a] > 0) return !1;
  8275.                     return !0
  8276.                 },
  8277.                 getMenusQuantity: function() {
  8278.                     var a, b = this.menus,
  8279.                         c = 0;
  8280.                     for (a in b) b.hasOwnProperty(a) && (c += b[a]);
  8281.                     return c
  8282.                 },
  8283.                 hasMainMenus: function(a) {
  8284.                     var b, c, d, e = ["MD", "SP", "SL", "FD"],
  8285.                         f = this.menus,
  8286.                         g = a.length,
  8287.                         h = !1;
  8288.                     for (b in f)
  8289.                         if (f.hasOwnProperty(b))
  8290.                             for (c = 0; g > c; c++)
  8291.                                 if (b === a[c].menu && (d = a[c].category, d && e.indexOf(d) > -1)) {
  8292.                                     h = !0;
  8293.                                     break
  8294.                                 }
  8295.                     return h
  8296.                 },
  8297.                 recalculatemenus: function(a) {
  8298.                     var c, d, e, f, g = this.menus,
  8299.                         h = a ? a.length || 0 : 0;
  8300.                     if (!this.id && g && a && a.length)
  8301.                         for (c in g) {
  8302.                             if (d = !1, g.hasOwnProperty(c))
  8303.                                 for (e = 0; h > e; e++)
  8304.                                     if (c === a[e].menu) {
  8305.                                         f = Math.min(a[e].quantity, a[e].templateQuantity, b.maxMenuQuantity), d = !0, "number" != typeof g[c] && (g[c] = f), g[c] = Math.min(g[c], f), g[c] <= 0 && delete g[c];
  8306.                                         break
  8307.                                     }
  8308.                             d || delete g[c]
  8309.                         }
  8310.                 }
  8311.             }), c.build = function(a) {
  8312.                 return new c({
  8313.                     menus: a && a.menus || {},
  8314.                     address: a && a.address || {}
  8315.                 })
  8316.             }, c
  8317.         }])
  8318.     }(),
  8319.     function() {
  8320.         "use strict";
  8321.         var a = {
  8322.                 MD: 0,
  8323.                 FD: 1,
  8324.                 SL: 2,
  8325.                 SP: 3,
  8326.                 DS: 4,
  8327.                 PB: 5,
  8328.                 BV: 6,
  8329.                 DEF: 7
  8330.             },
  8331.             b = 3;
  8332.         angular.module("sdl").filter("sortMenus", [function() {
  8333.             return function(b) {
  8334.                 var c = b ? b.slice() : [];
  8335.                 return c.sort(function(b, c) {
  8336.                     return b.category === c.category ? b.sid > c.sid ? 1 : -1 : a[b.category || "DEF"] > a[c.category || "DEF"] ? 1 : -1
  8337.                 }), c
  8338.             }
  8339.         }]).filter("mainMenus", [function() {
  8340.             return function(c) {
  8341.                 return c.filter(function(c) {
  8342.                     return a[c.category || "DEF"] <= b
  8343.                 })
  8344.             }
  8345.         }]).filter("byObjectKeysName", [function() {
  8346.             return function(a, b, c) {
  8347.                 return a.filter(function(a) {
  8348.                     return b[a[c]]
  8349.                 })
  8350.             }
  8351.         }]).filter("c2d", function() {
  8352.             return function(a) {
  8353.                 return (a / 100).toFixed(2)
  8354.             }
  8355.         })
  8356.     }(),
  8357.     function() {
  8358.         "use strict";
  8359.         angular.module("sdl").service("geoCode", ["$http", "$q", function(a, b) {
  8360.             var c, d, e, f = 800;
  8361.             return {
  8362.                 reverse: function(a, b) {
  8363.                     e || (e = new google.maps.Geocoder), d = a, c || (c = setTimeout(function() {
  8364.                         e.geocode({
  8365.                             location: d
  8366.                         }, function(a, d) {
  8367.                             d === google.maps.GeocoderStatus.OK ? b(a[0].formatted_address) : (console.error("Error rev geoc", d), b()), c = null
  8368.                         })
  8369.                     }, f))
  8370.                 }
  8371.             }
  8372.         }]).service("GeoJsonHelper", function() {
  8373.             return {
  8374.                 multiPolyToPolyArray: function(a) {
  8375.                     return a.coordinates.map(function(a) {
  8376.                         return a[0].map(function(a) {
  8377.                             return {
  8378.                                 lat: a[1],
  8379.                                 lng: a[0]
  8380.                             }
  8381.                         })
  8382.                     })
  8383.                 }
  8384.             }
  8385.         }).service("OrderService", [function() {
  8386.             return {
  8387.                 countPrice: function(a, b) {
  8388.                     var c = 0;
  8389.                     return b.filter(function(b) {
  8390.                         return !!a.menus[b.id]
  8391.                     }).forEach(function(b) {
  8392.                         c += b.price * a.menus[b.id]
  8393.                     }), c
  8394.                 }
  8395.             }
  8396.         }]).factory("config", ["$http", "staticConfig", function(a, b) {
  8397.             var c = b,
  8398.                 d = function() {
  8399.                     a.get("/api/config/1").then(function(a) {
  8400.                         c = a.data
  8401.                     })
  8402.                 };
  8403.             return d(), {
  8404.                 get: function(a) {
  8405.                     return d(), c[a] || ""
  8406.                 },
  8407.                 load: function() {
  8408.                     d()
  8409.                 }
  8410.             }
  8411.         }]).service("b64", [function() {
  8412.             var a = function(a) {
  8413.                     try {
  8414.                         return window.btoa(unescape(encodeURIComponent(JSON.stringify(a))))
  8415.                     } catch (b) {
  8416.                         console.error(b)
  8417.                     }
  8418.                 },
  8419.                 b = function(a) {
  8420.                     try {
  8421.                         return JSON.parse(decodeURIComponent(escape(window.atob(a))))
  8422.                     } catch (b) {
  8423.                         console.error(b)
  8424.                     }
  8425.                 };
  8426.             return {
  8427.                 obj_to_b64: a,
  8428.                 b64_to_obj: b
  8429.             }
  8430.         }]).service("DateTimeService", function() {
  8431.             var a = (new Date, ["კვი", "ორშ", "სამ", "ოთხ", "ხუთ", "პარ", "შაბ"]),
  8432.                 b = function() {
  8433.                     var a = new Date;
  8434.                     return a.setUTCHours(0), a.setUTCMinutes(0), a.setUTCSeconds(0), a.setUTCMilliseconds(0), a
  8435.                 },
  8436.                 c = function(b) {
  8437.                     var c, d, e, f, g, h, i, j = [],
  8438.                         k = "";
  8439.                     for (b.map(function(a) {
  8440.                             a.isWorkDay && j.push(new Date(a.id).getDay())
  8441.                         }), c = 0, d = j.length; d > c; c++) e = j[c], f = j[c - 1], g = j[c + 1], h = e - f, i = g - e, 1 === h && 1 === i || (k && k.lastIndexOf("-") !== k.length - 2 && k.lastIndexOf(",") !== k.length - 2 && (k += ", "), k += a[e]), i > 1 ? k += ", " : 1 === i && k.lastIndexOf("-") !== k.length - 2 && (k += " - ");
  8442.                     return k + ":"
  8443.                 },
  8444.                 d = function(a) {
  8445.                     return a.filter(function(a) {
  8446.                         return a.id.getTime() === b().getTime()
  8447.                     })[0]
  8448.                 },
  8449.                 e = function(a, c) {
  8450.                     var d = a.filter(function(a) {
  8451.                         return new Date(a.id).getTime() > b().getTime() && a.isWorkDay
  8452.                     }).sort(function(a, b) {
  8453.                         return new Date(a.id) - new Date(b.id)
  8454.                     });
  8455.                     return d && d[0]
  8456.                 },
  8457.                 f = function(a, b, c) {
  8458.                     var d = e(a, b),
  8459.                         f = 3600 * c * 1e3;
  8460.                     return d.start <= new Date(Date.now() + f)
  8461.                 },
  8462.                 g = function(a, c) {
  8463.                     var d = new Date,
  8464.                         f = e(a, c),
  8465.                         g = f && f.id;
  8466.                     return d.getTime() <= c.start.getTime() ? 0 : Math.floor((+g - +b()) / 864e5)
  8467.                 },
  8468.                 h = function(a) {
  8469.                     var b = new Date;
  8470.                     return a.isWorkDay && +b >= +a.start && +b < +a.end
  8471.                 },
  8472.                 i = function(a) {
  8473.                     var b = new Date;
  8474.                     return a.isWorkDay && +b > +a.end
  8475.                 },
  8476.                 j = function(b, c) {
  8477.                     var d = new Date,
  8478.                         f = d.getTime() <= c.start.getTime() ? c.start : e(b, c).start;
  8479.                     return {
  8480.                         name: a[f.getDay()],
  8481.                         start: f
  8482.                     }
  8483.                 },
  8484.                 k = function(a, b) {
  8485.                     var c = 0;
  8486.                     return a.menus && b ? c = a.menus.filter(function(a) {
  8487.                         return a.id === b
  8488.                     }).map(function(a) {
  8489.                         return a.quantity
  8490.                     })[0] : a.menus && a.menus.forEach(function(a) {
  8491.                         c += a.quantity
  8492.                     }), c
  8493.                 };
  8494.             return {
  8495.                 generateNowDate: b,
  8496.                 getWorkDaysPeriod: c,
  8497.                 getToday: d,
  8498.                 getClosestWorkDayNameAndStart: j,
  8499.                 todayWorkdayIsOver: i,
  8500.                 getNextWorkDay: e,
  8501.                 daysBeforeNextWorkDay: g,
  8502.                 isOpenHours: h,
  8503.                 nextWorkdayStartsInHours: f,
  8504.                 menusLeft: k
  8505.             }
  8506.         }).service("UpdateWorkdayScope", ["$q", "Workday", "DateTimeService", "staticConfig", function(a, b, c, d) {
  8507.             return function(e) {
  8508.                 var f = a.defer();
  8509.                 return b.query(function(a) {
  8510.                     a.forEach(function(a) {
  8511.                         a.id = new Date(a.id), a.start = new Date(a.start), a.end = new Date(a.end)
  8512.                     }), e.$applyAsync(function() {
  8513.                         e.workDays = a, e.workWeek = c.getWorkDaysPeriod(a), e.today = c.getToday(a), e.nextWorkDay = c.getNextWorkDay(a, e.today), e.willWorkAt = c.getClosestWorkDayNameAndStart(a, e.today), e.daysBeforeNextWorkDay = c.daysBeforeNextWorkDay(a, e.today), e.todayWorkdayIsOver = c.todayWorkdayIsOver(e.today), e.todaysmenusLeft = c.menusLeft(e.today), e.nextWorkDaysmenusLeft = c.menusLeft(e.nextWorkDay), e.menusLeft = c.menusLeft, e.isOpenHours = c.isOpenHours(e.today), e.isOpen = e.isOpenHours && e.todaysmenusLeft, e.workDaysPeriod = c.getWorkDaysPeriod, e.nextWorkdayStartsSoon = c.nextWorkdayStartsInHours(a, e.today, d.hideNextWorkdayMenusUntil), e.todaysmenusLeft && !e.todayWorkdayIsOver ? e.menus = e.today.menus : e.nextWorkdayStartsSoon ? e.menus = e.nextWorkDay.menus : e.menus = e.today.menus
  8514.                     }), f.resolve(e.menus)
  8515.                 }, function(a, b) {
  8516.                     console.error(a, b), f.reject(a)
  8517.                 }), f.promise
  8518.             }
  8519.         }]).factory("ResponsiveDetection", ["$window", function(a) {
  8520.             return {
  8521.                 getBreakpoint: function() {
  8522.                     var b = a.innerWidth;
  8523.                     return 768 > b ? "xs" : "lg"
  8524.                 }
  8525.             }
  8526.         }]).service("FlashMessage", function() {
  8527.             var a = {
  8528.                     formErrors: []
  8529.                 },
  8530.                 b = {};
  8531.             return {
  8532.                 setFlashErrors: function(b) {
  8533.                     b.forEach(function(b) {
  8534.                         "string" == typeof b ? a.formErrors.push(b) : a[b.field] = b.message
  8535.                     })
  8536.                 },
  8537.                 setFlashValues: function(a) {
  8538.                     b = a[0] || {}
  8539.                 },
  8540.                 getFormErrors: function() {
  8541.                     return a.formErrors
  8542.                 },
  8543.                 getFlashValues: function() {
  8544.                     return b
  8545.                 },
  8546.                 getError: function(b) {
  8547.                     return a[b]
  8548.                 },
  8549.                 getValue: function(a) {
  8550.                     return b[a]
  8551.                 },
  8552.                 clearError: function(b) {
  8553.                     delete a[b]
  8554.                 }
  8555.             }
  8556.         })
  8557.     }(),
  8558.     function(a) {
  8559.         "use strict";
  8560.         a.module("sdl").service("BankResponse", [function() {
  8561.             var a = {},
  8562.                 b = "FAIL";
  8563.             return {
  8564.                 setPaymentStrategyName: function(b) {
  8565.                     a.paymentStrategyName = b
  8566.                 },
  8567.                 setTransId: function(b) {
  8568.                     a.trans_id = b
  8569.                 },
  8570.                 setPaymentId: function(b) {
  8571.                     a.paymentId = b
  8572.                 },
  8573.                 setResponseStatus: function(b) {
  8574.                     a.responseStatus = b
  8575.                 },
  8576.                 setError: function(b) {
  8577.                     a.error = b
  8578.                 },
  8579.                 getPaymentStrategyName: function() {
  8580.                     return a.paymentStrategyName
  8581.                 },
  8582.                 getTransId: function() {
  8583.                     return a.trans_id
  8584.                 },
  8585.                 getPaymentId: function() {
  8586.                     return a.paymentId
  8587.                 },
  8588.                 getResponseStatus: function() {
  8589.                     return a.responseStatus
  8590.                 },
  8591.                 getError: function() {
  8592.                     return a.error
  8593.                 },
  8594.                 isFailed: function() {
  8595.                     return a.responseStatus === b
  8596.                 },
  8597.                 getBankResponse: function() {
  8598.                     return a
  8599.                 }
  8600.             }
  8601.         }])
  8602.     }(window.angular),
  8603.     function(a) {
  8604.         "use strict";
  8605.         a.module("sdl").service("CardTypeService", [function() {
  8606.             var a = [{
  8607.                     icon: "visa",
  8608.                     name: "Visa",
  8609.                     regex: /^4/
  8610.                 }, {
  8611.                     icon: "mc",
  8612.                     name: "MasterCard",
  8613.                     regex: /^5/
  8614.                 }, {
  8615.                     icon: "amex",
  8616.                     name: "American Express",
  8617.                     regex: /^3/
  8618.                 }],
  8619.                 b = a[1];
  8620.             return {
  8621.                 getCardType: function(c) {
  8622.                     return a.filter(function(a) {
  8623.                         return a.regex.test(c)
  8624.                     })[0] || b
  8625.                 }
  8626.             }
  8627.         }])
  8628.     }(window.angular),
  8629.     function(a, b) {
  8630.         "use strict";
  8631.         b.module("sdl").service("PaymentRedirect", [function() {
  8632.             return {
  8633.                 redirect: function(b) {
  8634.                     var c = a.createElement("form");
  8635.                     c.action = b.redirectUrl, c.method = "post";
  8636.                     for (var d in b.redirectFields)
  8637.                         if (b.redirectFields.hasOwnProperty(d)) {
  8638.                             var e = a.createElement("input");
  8639.                             e.name = d, e.type = "hidden", e.value = b.redirectFields[d], c.appendChild(e)
  8640.                         }
  8641.                     a.body.appendChild(c), c.submit()
  8642.                 }
  8643.             }
  8644.         }])
  8645.     }(window.document, window.angular),
  8646.     function(a) {
  8647.         "use strict";
  8648.         a.module("sdl").service("PaymentService", ["$http", function(a) {
  8649.             var b = function(a) {
  8650.                 if (200 !== a.status) throw {
  8651.                     code: a.status,
  8652.                     message: "Error"
  8653.                 };
  8654.                 return a.data
  8655.             };
  8656.             return {
  8657.                 checkByBankResponse: function(a) {
  8658.                     return a.paymentId ? this.check(a.paymentId) : this.checkByTransId(a.trans_id, a.paymentStrategyName)
  8659.                 },
  8660.                 failByBankResponse: function(a) {
  8661.                     return this.failByTransId(a.trans_id, a.error)
  8662.                 },
  8663.                 check: function(c) {
  8664.                     return a.post("/clientapi/payments/check", {
  8665.                         paymentId: c
  8666.                     }).then(b)
  8667.                 },
  8668.                 checkByTransId: function(c, d) {
  8669.                     return a.post("/clientapi/payments/check", {
  8670.                         trans_id: c,
  8671.                         paymentStrategyName: d
  8672.                     }).then(b)
  8673.                 },
  8674.                 failByTransId: function(c, d) {
  8675.                     return a.post("/clientapi/tbcPayments/failTransaction", {
  8676.                         trans_id: c,
  8677.                         error: d
  8678.                     }).then(b)
  8679.                 }
  8680.             }
  8681.         }])
  8682.     }(window.angular),
  8683.     function(a) {
  8684.         "use strict";
  8685.         window.angular.module("sdl").provider("gaEvent", [function() {
  8686.             var a = window.location;
  8687.             this.sendEvent = function(a, b, c, d) {
  8688.                 var e = e || window.ga,
  8689.                     f = {
  8690.                         hitType: "event",
  8691.                         eventCategory: a,
  8692.                         eventAction: b
  8693.                     };
  8694.                 e && (d || "number" != typeof c || (d = c, c = null), c && (f.eventLabel = c), d && (f.eventValue = d), e("send", f))
  8695.             }, this.sendPageview = function(b) {
  8696.                 var c = c || window.ga,
  8697.                     d = {
  8698.                         hitType: "pageview",
  8699.                         page: b || a.pathname || ""
  8700.                     };
  8701.                 c && c("send", d)
  8702.             }, this.$get = function() {
  8703.                 return {
  8704.                     sendEvent: this.send,
  8705.                     sendPageview: this.sendPageview
  8706.                 }
  8707.             }
  8708.         }])
  8709.     }(window),
  8710.     function(a) {
  8711.         "use strict";
  8712.         a.angular.module("sdl").provider("zopim", [function() {
  8713.             this.init = function() {
  8714.                 a.$zopim || function(b, c) {
  8715.                     var d = a.$zopim = function(a) {
  8716.                             d._.push(a)
  8717.                         },
  8718.                         e = d.s = b.createElement(c),
  8719.                         f = b.getElementsByTagName(c)[0];
  8720.                     d.set = function(a) {
  8721.                         d.set._.push(a)
  8722.                     }, d._ = [], d.set._ = [], e.async = !0, e.setAttribute("charset", "utf-8"), e.src = "//v2.zopim.com/?32rKnPxWbSjIPoDvfUQpEi0xAF90cOfe", d.t = +new Date, e.type = "text/javascript", f.parentNode.insertBefore(e, f)
  8723.                 }(document, "script")
  8724.             }, this.$get = function() {
  8725.                 return {
  8726.                     init: this.init
  8727.                 }
  8728.             }
  8729.         }])
  8730.     }(window);
Add Comment
Please, Sign In to add comment