Guest User

Main.js

a guest
Apr 22nd, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. !function(e) {
  2.     var t = {};
  3.     function r(n) {
  4.         if (t[n])
  5.             return t[n].exports;
  6.         var o = t[n] = {
  7.             i: n,
  8.             l: !1,
  9.             exports: {}
  10.         };
  11.         return e[n].call(o.exports, o, o.exports, r),
  12.         o.l = !0,
  13.         o.exports
  14.     }
  15.     r.m = e,
  16.     r.c = t,
  17.     r.d = function(e, t, n) {
  18.         r.o(e, t) || Object.defineProperty(e, t, {
  19.             enumerable: !0,
  20.             get: n
  21.         })
  22.     }
  23.     ,
  24.     r.r = function(e) {
  25.         "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
  26.             value: "Module"
  27.         }),
  28.         Object.defineProperty(e, "__esModule", {
  29.             value: !0
  30.         })
  31.     }
  32.     ,
  33.     r.t = function(e, t) {
  34.         if (1 & t && (e = r(e)),
  35.         8 & t)
  36.             return e;
  37.         if (4 & t && "object" == typeof e && e && e.__esModule)
  38.             return e;
  39.         var n = Object.create(null);
  40.         if (r.r(n),
  41.         Object.defineProperty(n, "default", {
  42.             enumerable: !0,
  43.             value: e
  44.         }),
  45.         2 & t && "string" != typeof e)
  46.             for (var o in e)
  47.                 r.d(n, o, function(t) {
  48.                     return e[t]
  49.                 }
  50.                 .bind(null, o));
  51.         return n
  52.     }
  53.     ,
  54.     r.n = function(e) {
  55.         var t = e && e.__esModule ? function() {
  56.             return e.default
  57.         }
  58.         : function() {
  59.             return e
  60.         }
  61.         ;
  62.         return r.d(t, "a", t),
  63.         t
  64.     }
  65.     ,
  66.     r.o = function(e, t) {
  67.         return Object.prototype.hasOwnProperty.call(e, t)
  68.     }
  69.     ,
  70.     r.p = "",
  71.     r(r.s = 1)
  72. }([function(e, t, r) {
  73.     "use strict";
  74.     t.decode = t.parse = r(4),
  75.     t.encode = t.stringify = r(5)
  76. }
  77. , function(e, t, r) {
  78.     "use strict";
  79.     r.r(t),
  80.     r.d(t, "rayOrderPlugin", function() {
  81.         return i
  82.     });
  83.     let n = r(2);
  84.     const o = "https://ant.aliceblueonline.com"
  85.       , s = ["orders", "holdings"];
  86.     class i {
  87.         constructor() {}
  88.         getCredentials() {
  89.             window.opener.postMessage({
  90.                 type: "client_credentials_request"
  91.             }, "*"),
  92.             window.addEventListener("message", this.receiveMessage, !1)
  93.         }
  94.         receiveMessage(e) {
  95.             if ("client_credentials_response" === e.data.type) {
  96.                 let t = window.location.search;
  97.                 new n({
  98.                     clientId: e.data.data.client_id,
  99.                     clientSecret: e.data.data.client_secret,
  100.                     accessTokenUri: o + "/oauth2/token",
  101.                     authorizationUri: o + "/oauth2/auth",
  102.                     redirectUri: o + "/plugin/callback",
  103.                     scopes: s,
  104.                     state: "3unqcjh2DN1o"
  105.                 }).code.getToken(t).then(function(e) {
  106.                     const t = {
  107.                         type: "access_token",
  108.                         data: {
  109.                             access_token: e.accessToken
  110.                         }
  111.                     };
  112.                     window.opener.postMessage(t, "*")
  113.                 })
  114.             }
  115.         }
  116.     }
  117.     window.rayOrderPluginLibrary = new i
  118. }
  119. , function(e, t, r) {
  120.     var n = r(3).Buffer
  121.       , o = r(0)
  122.       , s = r(6)
  123.       , i = r(11)
  124.       , a = "function" == typeof n ? function(e) {
  125.         return new n(e).toString("base64")
  126.     }
  127.     : window.btoa;
  128.     e.exports = g;
  129.     var h = {
  130.         Accept: "application/json, application/x-www-form-urlencoded",
  131.         "Content-Type": "application/x-www-form-urlencoded"
  132.     }
  133.       , c = {
  134.         invalid_request: ["The request is missing a required parameter, includes an", "invalid parameter value, includes a parameter more than", "once, or is otherwise malformed."].join(" "),
  135.         invalid_client: ["Client authentication failed (e.g., unknown client, no", "client authentication included, or unsupported", "authentication method)."].join(" "),
  136.         invalid_grant: ["The provided authorization grant (e.g., authorization", "code, resource owner credentials) or refresh token is", "invalid, expired, revoked, does not match the redirection", "URI used in the authorization request, or was issued to", "another client."].join(" "),
  137.         unauthorized_client: ["The client is not authorized to request an authorization", "code using this method."].join(" "),
  138.         unsupported_grant_type: ["The authorization grant type is not supported by the", "authorization server."].join(" "),
  139.         access_denied: ["The resource owner or authorization server denied the request."].join(" "),
  140.         unsupported_response_type: ["The authorization server does not support obtaining", "an authorization code using this method."].join(" "),
  141.         invalid_scope: ["The requested scope is invalid, unknown, or malformed."].join(" "),
  142.         server_error: ["The authorization server encountered an unexpected", "condition that prevented it from fulfilling the request.", "(This error code is needed because a 500 Internal Server", "Error HTTP status code cannot be returned to the client", "via an HTTP redirect.)"].join(" "),
  143.         temporarily_unavailable: ["The authorization server is currently unable to handle", "the request due to a temporary overloading or maintenance", "of the server."].join(" ")
  144.     };
  145.     function u(e) {
  146.         for (var t = 1; t < arguments.length; t++) {
  147.             var r = arguments[t];
  148.             if (null == e[r])
  149.                 throw new TypeError('Expected "' + r + '" to exist')
  150.         }
  151.     }
  152.     function l(e) {
  153.         var t = c[e.error] || e.error_description || e.error;
  154.         if (t) {
  155.             var r = new Error(t);
  156.             return r.body = e,
  157.             r.code = "EAUTH",
  158.             r
  159.         }
  160.     }
  161.     function p(e) {
  162.         return Array.isArray(e) ? e.join(" ") : m(e)
  163.     }
  164.     function f(e, t) {
  165.         return u(e, "clientId", "authorizationUri"),
  166.         e.authorizationUri + "?" + o.stringify(Object.assign({
  167.             client_id: e.clientId,
  168.             redirect_uri: e.redirectUri,
  169.             scope: p(e.scopes),
  170.             response_type: t,
  171.             state: e.state
  172.         }, e.query))
  173.     }
  174.     function d(e, t) {
  175.         return "Basic " + a(m(e) + ":" + m(t))
  176.     }
  177.     function m(e) {
  178.         return null == e ? "" : String(e)
  179.     }
  180.     function y(e, t) {
  181.         return {
  182.             url: e.url,
  183.             method: e.method,
  184.             body: Object.assign({}, e.body, t.body),
  185.             query: Object.assign({}, e.query, t.query),
  186.             headers: Object.assign({}, e.headers, t.headers)
  187.         }
  188.     }
  189.     function g(e, t) {
  190.         this.options = e,
  191.         this.request = t || i,
  192.         this.code = new T(this),
  193.         this.token = new j(this),
  194.         this.owner = new b(this),
  195.         this.credentials = new w(this),
  196.         this.jwt = new O(this)
  197.     }
  198.     function v(e, t) {
  199.         this.client = e,
  200.         this.data = t,
  201.         this.tokenType = t.token_type && t.token_type.toLowerCase(),
  202.         this.accessToken = t.access_token,
  203.         this.refreshToken = t.refresh_token,
  204.         this.expiresIn(Number(t.expires_in))
  205.     }
  206.     function b(e) {
  207.         this.client = e
  208.     }
  209.     function j(e) {
  210.         this.client = e
  211.     }
  212.     function w(e) {
  213.         this.client = e
  214.     }
  215.     function T(e) {
  216.         this.client = e
  217.     }
  218.     function O(e) {
  219.         this.client = e
  220.     }
  221.     g.Token = v,
  222.     g.prototype.createToken = function(e, t, r, n) {
  223.         var o = Object.assign({}, n, "string" == typeof e ? {
  224.             access_token: e
  225.         } : e, "string" == typeof t ? {
  226.             refresh_token: t
  227.         } : t, "string" == typeof r ? {
  228.             token_type: r
  229.         } : r);
  230.         return new g.Token(this,o)
  231.     }
  232.     ,
  233.     g.prototype._request = function(e) {
  234.         var t = e.url
  235.           , r = o.stringify(e.body)
  236.           , n = o.stringify(e.query);
  237.         return n && (t += (-1 === t.indexOf("?") ? "?" : "&") + n),
  238.         this.request(e.method, t, r, e.headers).then(function(e) {
  239.             var t = function(e) {
  240.                 try {
  241.                     return JSON.parse(e)
  242.                 } catch (t) {
  243.                     return o.parse(e)
  244.                 }
  245.             }(e.body)
  246.               , r = l(t);
  247.             if (r)
  248.                 return Promise.reject(r);
  249.             if (e.status < 200 || e.status >= 399) {
  250.                 var n = new Error("HTTP status " + e.status);
  251.                 return n.status = e.status,
  252.                 n.body = e.body,
  253.                 n.code = "ESTATUS",
  254.                 Promise.reject(n)
  255.             }
  256.             return t
  257.         })
  258.     }
  259.     ,
  260.     v.prototype.expiresIn = function(e) {
  261.         if ("number" == typeof e)
  262.             this.expires = new Date,
  263.             this.expires.setSeconds(this.expires.getSeconds() + e);
  264.         else {
  265.             if (!(e instanceof Date))
  266.                 throw new TypeError("Unknown duration: " + e);
  267.             this.expires = new Date(e.getTime())
  268.         }
  269.         return this.expires
  270.     }
  271.     ,
  272.     v.prototype.sign = function(e) {
  273.         if (!this.accessToken)
  274.             throw new Error("Unable to sign without access token");
  275.         if (e.headers = e.headers || {},
  276.         "bearer" === this.tokenType)
  277.             e.headers.Authorization = "Bearer " + this.accessToken;
  278.         else {
  279.             var t = e.url.split("#")
  280.               , r = "access_token=" + this.accessToken
  281.               , n = t[0].replace(/[?&]access_token=[^&#]/, "")
  282.               , o = t[1] ? "#" + t[1] : "";
  283.             e.url = n + (n.indexOf("?") > -1 ? "&" : "?") + r + o,
  284.             e.headers.Pragma = "no-store",
  285.             e.headers["Cache-Control"] = "no-store"
  286.         }
  287.         return e
  288.     }
  289.     ,
  290.     v.prototype.refresh = function(e) {
  291.         var t = this
  292.           , r = Object.assign({}, this.client.options, e);
  293.         return this.refreshToken ? this.client._request(y({
  294.             url: r.accessTokenUri,
  295.             method: "POST",
  296.             headers: Object.assign({}, h, {
  297.                 Authorization: d(r.clientId, r.clientSecret)
  298.             }),
  299.             body: {
  300.                 refresh_token: this.refreshToken,
  301.                 grant_type: "refresh_token"
  302.             }
  303.         }, r)).then(function(e) {
  304.             return t.client.createToken(Object.assign({}, t.data, e))
  305.         }) : Promise.reject(new Error("No refresh token"))
  306.     }
  307.     ,
  308.     v.prototype.expired = function() {
  309.         return Date.now() > this.expires.getTime()
  310.     }
  311.     ,
  312.     b.prototype.getToken = function(e, t, r) {
  313.         var n = this
  314.           , o = Object.assign({}, this.client.options, r);
  315.         return this.client._request(y({
  316.             url: o.accessTokenUri,
  317.             method: "POST",
  318.             headers: Object.assign({}, h, {
  319.                 Authorization: d(o.clientId, o.clientSecret)
  320.             }),
  321.             body: {
  322.                 scope: p(o.scopes),
  323.                 username: e,
  324.                 password: t,
  325.                 grant_type: "password"
  326.             }
  327.         }, o)).then(function(e) {
  328.             return n.client.createToken(e)
  329.         })
  330.     }
  331.     ,
  332.     j.prototype.getUri = function(e) {
  333.         return f(Object.assign({}, this.client.options, e), "token")
  334.     }
  335.     ,
  336.     j.prototype.getToken = function(e, t) {
  337.         var r = Object.assign({}, this.client.options, t)
  338.           , n = "object" == typeof e ? e : s.parse(e, !0)
  339.           , i = s.parse(r.redirectUri);
  340.         if ("string" == typeof n.pathname && n.pathname !== i.pathname)
  341.             return Promise.reject(new TypeError("Redirected path should match configured path, but got: " + n.pathname));
  342.         if (!n.hash && !n.search)
  343.             return Promise.reject(new TypeError("Unable to process uri: " + e));
  344.         var a = Object.assign({}, "string" == typeof n.query ? o.parse(n.query) : n.query || {}, "string" == typeof n.hash ? o.parse(n.hash.substr(1)) : n.hash || {})
  345.           , h = l(a);
  346.         return h ? Promise.reject(h) : null != r.state && a.state !== r.state ? Promise.reject(new TypeError("Invalid state: " + a.state)) : Promise.resolve(this.client.createToken(a))
  347.     }
  348.     ,
  349.     w.prototype.getToken = function(e) {
  350.         var t = this
  351.           , r = Object.assign({}, this.client.options, e);
  352.         return u(r, "clientId", "clientSecret", "accessTokenUri"),
  353.         this.client._request(y({
  354.             url: r.accessTokenUri,
  355.             method: "POST",
  356.             headers: Object.assign({}, h, {
  357.                 Authorization: d(r.clientId, r.clientSecret)
  358.             }),
  359.             body: {
  360.                 scope: p(r.scopes),
  361.                 grant_type: "client_credentials"
  362.             }
  363.         }, r)).then(function(e) {
  364.             return t.client.createToken(e)
  365.         })
  366.     }
  367.     ,
  368.     T.prototype.getUri = function(e) {
  369.         return f(Object.assign({}, this.client.options, e), "code")
  370.     }
  371.     ,
  372.     T.prototype.getToken = function(e, t) {
  373.         var r = this
  374.           , n = Object.assign({}, this.client.options, t);
  375.         u(n, "clientId", "accessTokenUri");
  376.         var i = "object" == typeof e ? e : s.parse(e, !0);
  377.         if ("string" == typeof n.redirectUri && "string" == typeof i.pathname && i.pathname !== s.parse(n.redirectUri).pathname)
  378.             return Promise.reject(new TypeError("Redirected path should match configured path, but got: " + i.pathname));
  379.         if (!i.query)
  380.             return Promise.reject(new TypeError("Unable to process uri: " + e));
  381.         var a = "string" == typeof i.query ? o.parse(i.query) : i.query || {}
  382.           , c = l(a);
  383.         if (c)
  384.             return Promise.reject(c);
  385.         if (null != n.state && a.state !== n.state)
  386.             return Promise.reject(new TypeError("Invalid state: " + a.state));
  387.         if (!a.code)
  388.             return Promise.reject(new TypeError("Missing code, unable to request token"));
  389.         var p = Object.assign({}, h)
  390.           , f = {
  391.             code: a.code,
  392.             grant_type: "authorization_code",
  393.             redirect_uri: n.redirectUri
  394.         };
  395.         return n.clientSecret ? p.Authorization = d(n.clientId, n.clientSecret) : f.client_id = n.clientId,
  396.         this.client._request(y({
  397.             url: n.accessTokenUri,
  398.             method: "POST",
  399.             headers: p,
  400.             body: f
  401.         }, n)).then(function(e) {
  402.             return r.client.createToken(e)
  403.         })
  404.     }
  405.     ,
  406.     O.prototype.getToken = function(e, t) {
  407.         var r = this
  408.           , n = Object.assign({}, this.client.options, t)
  409.           , o = Object.assign({}, h);
  410.         return u(n, "accessTokenUri"),
  411.         n.clientId && (o.Authorization = d(n.clientId, n.clientSecret)),
  412.         this.client._request(y({
  413.             url: n.accessTokenUri,
  414.             method: "POST",
  415.             headers: o,
  416.             body: {
  417.                 scope: p(n.scopes),
  418.                 grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer",
  419.                 assertion: e
  420.             }
  421.         }, n)).then(function(e) {
  422.             return r.client.createToken(e)
  423.         })
  424.     }
  425. }
  426. , function(e, t) {}
  427. , function(e, t, r) {
  428.     "use strict";
  429.     function n(e, t) {
  430.         return Object.prototype.hasOwnProperty.call(e, t)
  431.     }
  432.     e.exports = function(e, t, r, s) {
  433.         t = t || "&",
  434.         r = r || "=";
  435.         var i = {};
  436.         if ("string" != typeof e || 0 === e.length)
  437.             return i;
  438.         var a = /\+/g;
  439.         e = e.split(t);
  440.         var h = 1e3;
  441.         s && "number" == typeof s.maxKeys && (h = s.maxKeys);
  442.         var c = e.length;
  443.         h > 0 && c > h && (c = h);
  444.         for (var u = 0; u < c; ++u) {
  445.             var l, p, f, d, m = e[u].replace(a, "%20"), y = m.indexOf(r);
  446.             y >= 0 ? (l = m.substr(0, y),
  447.             p = m.substr(y + 1)) : (l = m,
  448.             p = ""),
  449.             f = decodeURIComponent(l),
  450.             d = decodeURIComponent(p),
  451.             n(i, f) ? o(i[f]) ? i[f].push(d) : i[f] = [i[f], d] : i[f] = d
  452.         }
  453.         return i
  454.     }
  455.     ;
  456.     var o = Array.isArray || function(e) {
  457.         return "[object Array]" === Object.prototype.toString.call(e)
  458.     }
  459. }
  460. , function(e, t, r) {
  461.     "use strict";
  462.     var n = function(e) {
  463.         switch (typeof e) {
  464.         case "string":
  465.             return e;
  466.         case "boolean":
  467.             return e ? "true" : "false";
  468.         case "number":
  469.             return isFinite(e) ? e : "";
  470.         default:
  471.             return ""
  472.         }
  473.     };
  474.     e.exports = function(e, t, r, a) {
  475.         return t = t || "&",
  476.         r = r || "=",
  477.         null === e && (e = void 0),
  478.         "object" == typeof e ? s(i(e), function(i) {
  479.             var a = encodeURIComponent(n(i)) + r;
  480.             return o(e[i]) ? s(e[i], function(e) {
  481.                 return a + encodeURIComponent(n(e))
  482.             }).join(t) : a + encodeURIComponent(n(e[i]))
  483.         }).join(t) : a ? encodeURIComponent(n(a)) + r + encodeURIComponent(n(e)) : ""
  484.     }
  485.     ;
  486.     var o = Array.isArray || function(e) {
  487.         return "[object Array]" === Object.prototype.toString.call(e)
  488.     }
  489.     ;
  490.     function s(e, t) {
  491.         if (e.map)
  492.             return e.map(t);
  493.         for (var r = [], n = 0; n < e.length; n++)
  494.             r.push(t(e[n], n));
  495.         return r
  496.     }
  497.     var i = Object.keys || function(e) {
  498.         var t = [];
  499.         for (var r in e)
  500.             Object.prototype.hasOwnProperty.call(e, r) && t.push(r);
  501.         return t
  502.     }
  503. }
  504. , function(e, t, r) {
  505.     "use strict";
  506.     var n = r(7)
  507.       , o = r(10);
  508.     function s() {
  509.         this.protocol = null,
  510.         this.slashes = null,
  511.         this.auth = null,
  512.         this.host = null,
  513.         this.port = null,
  514.         this.hostname = null,
  515.         this.hash = null,
  516.         this.search = null,
  517.         this.query = null,
  518.         this.pathname = null,
  519.         this.path = null,
  520.         this.href = null
  521.     }
  522.     t.parse = b,
  523.     t.resolve = function(e, t) {
  524.         return b(e, !1, !0).resolve(t)
  525.     }
  526.     ,
  527.     t.resolveObject = function(e, t) {
  528.         return e ? b(e, !1, !0).resolveObject(t) : t
  529.     }
  530.     ,
  531.     t.format = function(e) {
  532.         o.isString(e) && (e = b(e));
  533.         return e instanceof s ? e.format() : s.prototype.format.call(e)
  534.     }
  535.     ,
  536.     t.Url = s;
  537.     var i = /^([a-z0-9.+-]+:)/i
  538.       , a = /:[0-9]*$/
  539.       , h = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/
  540.       , c = ["{", "}", "|", "\\", "^", "`"].concat(["<", ">", '"', "`", " ", "\r", "\n", "\t"])
  541.       , u = ["'"].concat(c)
  542.       , l = ["%", "/", "?", ";", "#"].concat(u)
  543.       , p = ["/", "?", "#"]
  544.       , f = /^[+a-z0-9A-Z_-]{0,63}$/
  545.       , d = /^([+a-z0-9A-Z_-]{0,63})(.*)$/
  546.       , m = {
  547.         javascript: !0,
  548.         "javascript:": !0
  549.     }
  550.       , y = {
  551.         javascript: !0,
  552.         "javascript:": !0
  553.     }
  554.       , g = {
  555.         http: !0,
  556.         https: !0,
  557.         ftp: !0,
  558.         gopher: !0,
  559.         file: !0,
  560.         "http:": !0,
  561.         "https:": !0,
  562.         "ftp:": !0,
  563.         "gopher:": !0,
  564.         "file:": !0
  565.     }
  566.       , v = r(0);
  567.     function b(e, t, r) {
  568.         if (e && o.isObject(e) && e instanceof s)
  569.             return e;
  570.         var n = new s;
  571.         return n.parse(e, t, r),
  572.         n
  573.     }
  574.     s.prototype.parse = function(e, t, r) {
  575.         if (!o.isString(e))
  576.             throw new TypeError("Parameter 'url' must be a string, not " + typeof e);
  577.         var s = e.indexOf("?")
  578.           , a = -1 !== s && s < e.indexOf("#") ? "?" : "#"
  579.           , c = e.split(a);
  580.         c[0] = c[0].replace(/\\/g, "/");
  581.         var b = e = c.join(a);
  582.         if (b = b.trim(),
  583.         !r && 1 === e.split("#").length) {
  584.             var j = h.exec(b);
  585.             if (j)
  586.                 return this.path = b,
  587.                 this.href = b,
  588.                 this.pathname = j[1],
  589.                 j[2] ? (this.search = j[2],
  590.                 this.query = t ? v.parse(this.search.substr(1)) : this.search.substr(1)) : t && (this.search = "",
  591.                 this.query = {}),
  592.                 this
  593.         }
  594.         var w = i.exec(b);
  595.         if (w) {
  596.             var T = (w = w[0]).toLowerCase();
  597.             this.protocol = T,
  598.             b = b.substr(w.length)
  599.         }
  600.         if (r || w || b.match(/^\/\/[^@\/]+@[^@\/]+/)) {
  601.             var O = "//" === b.substr(0, 2);
  602.             !O || w && y[w] || (b = b.substr(2),
  603.             this.slashes = !0)
  604.         }
  605.         if (!y[w] && (O || w && !g[w])) {
  606.             for (var k, x, _ = -1, q = 0; q < p.length; q++) {
  607.                 -1 !== (U = b.indexOf(p[q])) && (-1 === _ || U < _) && (_ = U)
  608.             }
  609.             -1 !== (x = -1 === _ ? b.lastIndexOf("@") : b.lastIndexOf("@", _)) && (k = b.slice(0, x),
  610.             b = b.slice(x + 1),
  611.             this.auth = decodeURIComponent(k)),
  612.             _ = -1;
  613.             for (q = 0; q < l.length; q++) {
  614.                 var U;
  615.                 -1 !== (U = b.indexOf(l[q])) && (-1 === _ || U < _) && (_ = U)
  616.             }
  617.             -1 === _ && (_ = b.length),
  618.             this.host = b.slice(0, _),
  619.             b = b.slice(_),
  620.             this.parseHost(),
  621.             this.hostname = this.hostname || "";
  622.             var I = "[" === this.hostname[0] && "]" === this.hostname[this.hostname.length - 1];
  623.             if (!I)
  624.                 for (var P = this.hostname.split(/\./), A = (q = 0,
  625.                 P.length); q < A; q++) {
  626.                     var S = P[q];
  627.                     if (S && !S.match(f)) {
  628.                         for (var C = "", z = 0, E = S.length; z < E; z++)
  629.                             S.charCodeAt(z) > 127 ? C += "x" : C += S[z];
  630.                         if (!C.match(f)) {
  631.                             var R = P.slice(0, q)
  632.                               , M = P.slice(q + 1)
  633.                               , N = S.match(d);
  634.                             N && (R.push(N[1]),
  635.                             M.unshift(N[2])),
  636.                             M.length && (b = "/" + M.join(".") + b),
  637.                             this.hostname = R.join(".");
  638.                             break
  639.                         }
  640.                     }
  641.                 }
  642.             this.hostname.length > 255 ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(),
  643.             I || (this.hostname = n.toASCII(this.hostname));
  644.             var H = this.port ? ":" + this.port : ""
  645.               , L = this.hostname || "";
  646.             this.host = L + H,
  647.             this.href += this.host,
  648.             I && (this.hostname = this.hostname.substr(1, this.hostname.length - 2),
  649.             "/" !== b[0] && (b = "/" + b))
  650.         }
  651.         if (!m[T])
  652.             for (q = 0,
  653.             A = u.length; q < A; q++) {
  654.                 var F = u[q];
  655.                 if (-1 !== b.indexOf(F)) {
  656.                     var D = encodeURIComponent(F);
  657.                     D === F && (D = escape(F)),
  658.                     b = b.split(F).join(D)
  659.                 }
  660.             }
  661.         var $ = b.indexOf("#");
  662.         -1 !== $ && (this.hash = b.substr($),
  663.         b = b.slice(0, $));
  664.         var B = b.indexOf("?");
  665.         if (-1 !== B ? (this.search = b.substr(B),
  666.         this.query = b.substr(B + 1),
  667.         t && (this.query = v.parse(this.query)),
  668.         b = b.slice(0, B)) : t && (this.search = "",
  669.         this.query = {}),
  670.         b && (this.pathname = b),
  671.         g[T] && this.hostname && !this.pathname && (this.pathname = "/"),
  672.         this.pathname || this.search) {
  673.             H = this.pathname || "";
  674.             var K = this.search || "";
  675.             this.path = H + K
  676.         }
  677.         return this.href = this.format(),
  678.         this
  679.     }
  680.     ,
  681.     s.prototype.format = function() {
  682.         var e = this.auth || "";
  683.         e && (e = (e = encodeURIComponent(e)).replace(/%3A/i, ":"),
  684.         e += "@");
  685.         var t = this.protocol || ""
  686.           , r = this.pathname || ""
  687.           , n = this.hash || ""
  688.           , s = !1
  689.           , i = "";
  690.         this.host ? s = e + this.host : this.hostname && (s = e + (-1 === this.hostname.indexOf(":") ? this.hostname : "[" + this.hostname + "]"),
  691.         this.port && (s += ":" + this.port)),
  692.         this.query && o.isObject(this.query) && Object.keys(this.query).length && (i = v.stringify(this.query));
  693.         var a = this.search || i && "?" + i || "";
  694.         return t && ":" !== t.substr(-1) && (t += ":"),
  695.         this.slashes || (!t || g[t]) && !1 !== s ? (s = "//" + (s || ""),
  696.         r && "/" !== r.charAt(0) && (r = "/" + r)) : s || (s = ""),
  697.         n && "#" !== n.charAt(0) && (n = "#" + n),
  698.         a && "?" !== a.charAt(0) && (a = "?" + a),
  699.         t + s + (r = r.replace(/[?#]/g, function(e) {
  700.             return encodeURIComponent(e)
  701.         })) + (a = a.replace("#", "%23")) + n
  702.     }
  703.     ,
  704.     s.prototype.resolve = function(e) {
  705.         return this.resolveObject(b(e, !1, !0)).format()
  706.     }
  707.     ,
  708.     s.prototype.resolveObject = function(e) {
  709.         if (o.isString(e)) {
  710.             var t = new s;
  711.             t.parse(e, !1, !0),
  712.             e = t
  713.         }
  714.         for (var r = new s, n = Object.keys(this), i = 0; i < n.length; i++) {
  715.             var a = n[i];
  716.             r[a] = this[a]
  717.         }
  718.         if (r.hash = e.hash,
  719.         "" === e.href)
  720.             return r.href = r.format(),
  721.             r;
  722.         if (e.slashes && !e.protocol) {
  723.             for (var h = Object.keys(e), c = 0; c < h.length; c++) {
  724.                 var u = h[c];
  725.                 "protocol" !== u && (r[u] = e[u])
  726.             }
  727.             return g[r.protocol] && r.hostname && !r.pathname && (r.path = r.pathname = "/"),
  728.             r.href = r.format(),
  729.             r
  730.         }
  731.         if (e.protocol && e.protocol !== r.protocol) {
  732.             if (!g[e.protocol]) {
  733.                 for (var l = Object.keys(e), p = 0; p < l.length; p++) {
  734.                     var f = l[p];
  735.                     r[f] = e[f]
  736.                 }
  737.                 return r.href = r.format(),
  738.                 r
  739.             }
  740.             if (r.protocol = e.protocol,
  741.             e.host || y[e.protocol])
  742.                 r.pathname = e.pathname;
  743.             else {
  744.                 for (var d = (e.pathname || "").split("/"); d.length && !(e.host = d.shift()); )
  745.                     ;
  746.                 e.host || (e.host = ""),
  747.                 e.hostname || (e.hostname = ""),
  748.                 "" !== d[0] && d.unshift(""),
  749.                 d.length < 2 && d.unshift(""),
  750.                 r.pathname = d.join("/")
  751.             }
  752.             if (r.search = e.search,
  753.             r.query = e.query,
  754.             r.host = e.host || "",
  755.             r.auth = e.auth,
  756.             r.hostname = e.hostname || e.host,
  757.             r.port = e.port,
  758.             r.pathname || r.search) {
  759.                 var m = r.pathname || ""
  760.                   , v = r.search || "";
  761.                 r.path = m + v
  762.             }
  763.             return r.slashes = r.slashes || e.slashes,
  764.             r.href = r.format(),
  765.             r
  766.         }
  767.         var b = r.pathname && "/" === r.pathname.charAt(0)
  768.           , j = e.host || e.pathname && "/" === e.pathname.charAt(0)
  769.           , w = j || b || r.host && e.pathname
  770.           , T = w
  771.           , O = r.pathname && r.pathname.split("/") || []
  772.           , k = (d = e.pathname && e.pathname.split("/") || [],
  773.         r.protocol && !g[r.protocol]);
  774.         if (k && (r.hostname = "",
  775.         r.port = null,
  776.         r.host && ("" === O[0] ? O[0] = r.host : O.unshift(r.host)),
  777.         r.host = "",
  778.         e.protocol && (e.hostname = null,
  779.         e.port = null,
  780.         e.host && ("" === d[0] ? d[0] = e.host : d.unshift(e.host)),
  781.         e.host = null),
  782.         w = w && ("" === d[0] || "" === O[0])),
  783.         j)
  784.             r.host = e.host || "" === e.host ? e.host : r.host,
  785.             r.hostname = e.hostname || "" === e.hostname ? e.hostname : r.hostname,
  786.             r.search = e.search,
  787.             r.query = e.query,
  788.             O = d;
  789.         else if (d.length)
  790.             O || (O = []),
  791.             O.pop(),
  792.             O = O.concat(d),
  793.             r.search = e.search,
  794.             r.query = e.query;
  795.         else if (!o.isNullOrUndefined(e.search)) {
  796.             if (k)
  797.                 r.hostname = r.host = O.shift(),
  798.                 (I = !!(r.host && r.host.indexOf("@") > 0) && r.host.split("@")) && (r.auth = I.shift(),
  799.                 r.host = r.hostname = I.shift());
  800.             return r.search = e.search,
  801.             r.query = e.query,
  802.             o.isNull(r.pathname) && o.isNull(r.search) || (r.path = (r.pathname ? r.pathname : "") + (r.search ? r.search : "")),
  803.             r.href = r.format(),
  804.             r
  805.         }
  806.         if (!O.length)
  807.             return r.pathname = null,
  808.             r.search ? r.path = "/" + r.search : r.path = null,
  809.             r.href = r.format(),
  810.             r;
  811.         for (var x = O.slice(-1)[0], _ = (r.host || e.host || O.length > 1) && ("." === x || ".." === x) || "" === x, q = 0, U = O.length; U >= 0; U--)
  812.             "." === (x = O[U]) ? O.splice(U, 1) : ".." === x ? (O.splice(U, 1),
  813.             q++) : q && (O.splice(U, 1),
  814.             q--);
  815.         if (!w && !T)
  816.             for (; q--; q)
  817.                 O.unshift("..");
  818.         !w || "" === O[0] || O[0] && "/" === O[0].charAt(0) || O.unshift(""),
  819.         _ && "/" !== O.join("/").substr(-1) && O.push("");
  820.         var I, P = "" === O[0] || O[0] && "/" === O[0].charAt(0);
  821.         k && (r.hostname = r.host = P ? "" : O.length ? O.shift() : "",
  822.         (I = !!(r.host && r.host.indexOf("@") > 0) && r.host.split("@")) && (r.auth = I.shift(),
  823.         r.host = r.hostname = I.shift()));
  824.         return (w = w || r.host && O.length) && !P && O.unshift(""),
  825.         O.length ? r.pathname = O.join("/") : (r.pathname = null,
  826.         r.path = null),
  827.         o.isNull(r.pathname) && o.isNull(r.search) || (r.path = (r.pathname ? r.pathname : "") + (r.search ? r.search : "")),
  828.         r.auth = e.auth || r.auth,
  829.         r.slashes = r.slashes || e.slashes,
  830.         r.href = r.format(),
  831.         r
  832.     }
  833.     ,
  834.     s.prototype.parseHost = function() {
  835.         var e = this.host
  836.           , t = a.exec(e);
  837.         t && (":" !== (t = t[0]) && (this.port = t.substr(1)),
  838.         e = e.substr(0, e.length - t.length)),
  839.         e && (this.hostname = e)
  840.     }
  841. }
  842. , function(e, t, r) {
  843.     (function(e, n) {
  844.         var o;
  845.         /*! https://mths.be/punycode v1.4.1 by @mathias */
  846.         !function(s) {
  847.             "object" == typeof t && t && t.nodeType,
  848.             "object" == typeof e && e && e.nodeType;
  849.             var i = "object" == typeof n && n;
  850.             i.global !== i && i.window !== i && i.self;
  851.             var a, h = 2147483647, c = 36, u = 1, l = 26, p = 38, f = 700, d = 72, m = 128, y = "-", g = /^xn--/, v = /[^\x20-\x7E]/, b = /[\x2E\u3002\uFF0E\uFF61]/g, j = {
  852.                 overflow: "Overflow: input needs wider integers to process",
  853.                 "not-basic": "Illegal input >= 0x80 (not a basic code point)",
  854.                 "invalid-input": "Invalid input"
  855.             }, w = c - u, T = Math.floor, O = String.fromCharCode;
  856.             function k(e) {
  857.                 throw new RangeError(j[e])
  858.             }
  859.             function x(e, t) {
  860.                 for (var r = e.length, n = []; r--; )
  861.                     n[r] = t(e[r]);
  862.                 return n
  863.             }
  864.             function _(e, t) {
  865.                 var r = e.split("@")
  866.                   , n = "";
  867.                 return r.length > 1 && (n = r[0] + "@",
  868.                 e = r[1]),
  869.                 n + x((e = e.replace(b, ".")).split("."), t).join(".")
  870.             }
  871.             function q(e) {
  872.                 for (var t, r, n = [], o = 0, s = e.length; o < s; )
  873.                     (t = e.charCodeAt(o++)) >= 55296 && t <= 56319 && o < s ? 56320 == (64512 & (r = e.charCodeAt(o++))) ? n.push(((1023 & t) << 10) + (1023 & r) + 65536) : (n.push(t),
  874.                     o--) : n.push(t);
  875.                 return n
  876.             }
  877.             function U(e) {
  878.                 return x(e, function(e) {
  879.                     var t = "";
  880.                     return e > 65535 && (t += O((e -= 65536) >>> 10 & 1023 | 55296),
  881.                     e = 56320 | 1023 & e),
  882.                     t += O(e)
  883.                 }).join("")
  884.             }
  885.             function I(e) {
  886.                 return e - 48 < 10 ? e - 22 : e - 65 < 26 ? e - 65 : e - 97 < 26 ? e - 97 : c
  887.             }
  888.             function P(e, t) {
  889.                 return e + 22 + 75 * (e < 26) - ((0 != t) << 5)
  890.             }
  891.             function A(e, t, r) {
  892.                 var n = 0;
  893.                 for (e = r ? T(e / f) : e >> 1,
  894.                 e += T(e / t); e > w * l >> 1; n += c)
  895.                     e = T(e / w);
  896.                 return T(n + (w + 1) * e / (e + p))
  897.             }
  898.             function S(e) {
  899.                 var t, r, n, o, s, i, a, p, f, g, v = [], b = e.length, j = 0, w = m, O = d;
  900.                 for ((r = e.lastIndexOf(y)) < 0 && (r = 0),
  901.                 n = 0; n < r; ++n)
  902.                     e.charCodeAt(n) >= 128 && k("not-basic"),
  903.                     v.push(e.charCodeAt(n));
  904.                 for (o = r > 0 ? r + 1 : 0; o < b; ) {
  905.                     for (s = j,
  906.                     i = 1,
  907.                     a = c; o >= b && k("invalid-input"),
  908.                     ((p = I(e.charCodeAt(o++))) >= c || p > T((h - j) / i)) && k("overflow"),
  909.                     j += p * i,
  910.                     !(p < (f = a <= O ? u : a >= O + l ? l : a - O)); a += c)
  911.                         i > T(h / (g = c - f)) && k("overflow"),
  912.                         i *= g;
  913.                     O = A(j - s, t = v.length + 1, 0 == s),
  914.                     T(j / t) > h - w && k("overflow"),
  915.                     w += T(j / t),
  916.                     j %= t,
  917.                     v.splice(j++, 0, w)
  918.                 }
  919.                 return U(v)
  920.             }
  921.             function C(e) {
  922.                 var t, r, n, o, s, i, a, p, f, g, v, b, j, w, x, _ = [];
  923.                 for (b = (e = q(e)).length,
  924.                 t = m,
  925.                 r = 0,
  926.                 s = d,
  927.                 i = 0; i < b; ++i)
  928.                     (v = e[i]) < 128 && _.push(O(v));
  929.                 for (n = o = _.length,
  930.                 o && _.push(y); n < b; ) {
  931.                     for (a = h,
  932.                     i = 0; i < b; ++i)
  933.                         (v = e[i]) >= t && v < a && (a = v);
  934.                     for (a - t > T((h - r) / (j = n + 1)) && k("overflow"),
  935.                     r += (a - t) * j,
  936.                     t = a,
  937.                     i = 0; i < b; ++i)
  938.                         if ((v = e[i]) < t && ++r > h && k("overflow"),
  939.                         v == t) {
  940.                             for (p = r,
  941.                             f = c; !(p < (g = f <= s ? u : f >= s + l ? l : f - s)); f += c)
  942.                                 x = p - g,
  943.                                 w = c - g,
  944.                                 _.push(O(P(g + x % w, 0))),
  945.                                 p = T(x / w);
  946.                             _.push(O(P(p, 0))),
  947.                             s = A(r, j, n == o),
  948.                             r = 0,
  949.                             ++n
  950.                         }
  951.                     ++r,
  952.                     ++t
  953.                 }
  954.                 return _.join("")
  955.             }
  956.             a = {
  957.                 version: "1.4.1",
  958.                 ucs2: {
  959.                     decode: q,
  960.                     encode: U
  961.                 },
  962.                 decode: S,
  963.                 encode: C,
  964.                 toASCII: function(e) {
  965.                     return _(e, function(e) {
  966.                         return v.test(e) ? "xn--" + C(e) : e
  967.                     })
  968.                 },
  969.                 toUnicode: function(e) {
  970.                     return _(e, function(e) {
  971.                         return g.test(e) ? S(e.slice(4).toLowerCase()) : e
  972.                     })
  973.                 }
  974.             },
  975.             void 0 === (o = function() {
  976.                 return a
  977.             }
  978.             .call(t, r, t, e)) || (e.exports = o)
  979.         }()
  980.     }
  981.     ).call(this, r(8)(e), r(9))
  982. }
  983. , function(e, t) {
  984.     e.exports = function(e) {
  985.         return e.webpackPolyfill || (e.deprecate = function() {}
  986.         ,
  987.         e.paths = [],
  988.         e.children || (e.children = []),
  989.         Object.defineProperty(e, "loaded", {
  990.             enumerable: !0,
  991.             get: function() {
  992.                 return e.l
  993.             }
  994.         }),
  995.         Object.defineProperty(e, "id", {
  996.             enumerable: !0,
  997.             get: function() {
  998.                 return e.i
  999.             }
  1000.         }),
  1001.         e.webpackPolyfill = 1),
  1002.         e
  1003.     }
  1004. }
  1005. , function(e, t) {
  1006.     var r;
  1007.     r = function() {
  1008.         return this
  1009.     }();
  1010.     try {
  1011.         r = r || Function("return this")() || (0,
  1012.         eval)("this")
  1013.     } catch (e) {
  1014.         "object" == typeof window && (r = window)
  1015.     }
  1016.     e.exports = r
  1017. }
  1018. , function(e, t, r) {
  1019.     "use strict";
  1020.     e.exports = {
  1021.         isString: function(e) {
  1022.             return "string" == typeof e
  1023.         },
  1024.         isObject: function(e) {
  1025.             return "object" == typeof e && null !== e
  1026.         },
  1027.         isNull: function(e) {
  1028.             return null === e
  1029.         },
  1030.         isNullOrUndefined: function(e) {
  1031.             return null == e
  1032.         }
  1033.     }
  1034. }
  1035. , function(e, t) {
  1036.     e.exports = function(e, t, r, n) {
  1037.         return new Promise(function(o, s) {
  1038.             var i = new window.XMLHttpRequest;
  1039.             i.open(e, t),
  1040.             i.onload = function() {
  1041.                 return o({
  1042.                     status: i.status,
  1043.                     body: i.responseText
  1044.                 })
  1045.             }
  1046.             ,
  1047.             i.onerror = i.onabort = function() {
  1048.                 return s(new Error(i.statusText || "XHR aborted: " + t))
  1049.             }
  1050.             ,
  1051.             Object.keys(n).forEach(function(e) {
  1052.                 i.setRequestHeader(e, n[e])
  1053.             }),
  1054.             i.send(r)
  1055.         }
  1056.         )
  1057.     }
  1058. }
  1059. ]);
Add Comment
Please, Sign In to add comment