xipo

Untitled

Jul 2nd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 51.07 KB | None | 0 0
  1. /******/ (function(modules) { // webpackBootstrap
  2. /******/ // The module cache
  3. /******/ var installedModules = {};
  4. /******/
  5. /******/ // The require function
  6. /******/ function __webpack_require__(moduleId) {
  7. /******/
  8. /******/ // Check if module is in cache
  9. /******/ if(installedModules[moduleId])
  10. /******/ return installedModules[moduleId].exports;
  11. /******/
  12. /******/ // Create a new module (and put it into the cache)
  13. /******/ var module = installedModules[moduleId] = {
  14. /******/ i: moduleId,
  15. /******/ l: false,
  16. /******/ exports: {}
  17. /******/ };
  18. /******/
  19. /******/ // Execute the module function
  20. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  21. /******/
  22. /******/ // Flag the module as loaded
  23. /******/ module.l = true;
  24. /******/
  25. /******/ // Return the exports of the module
  26. /******/ return module.exports;
  27. /******/ }
  28. /******/
  29. /******/
  30. /******/ // expose the modules object (__webpack_modules__)
  31. /******/ __webpack_require__.m = modules;
  32. /******/
  33. /******/ // expose the module cache
  34. /******/ __webpack_require__.c = installedModules;
  35. /******/
  36. /******/ // identity function for calling harmony imports with the correct context
  37. /******/ __webpack_require__.i = function(value) { return value; };
  38. /******/
  39. /******/ // define getter function for harmony exports
  40. /******/ __webpack_require__.d = function(exports, name, getter) {
  41. /******/ if(!__webpack_require__.o(exports, name)) {
  42. /******/ Object.defineProperty(exports, name, {
  43. /******/ configurable: false,
  44. /******/ enumerable: true,
  45. /******/ get: getter
  46. /******/ });
  47. /******/ }
  48. /******/ };
  49. /******/
  50. /******/ // getDefaultExport function for compatibility with non-harmony modules
  51. /******/ __webpack_require__.n = function(module) {
  52. /******/ var getter = module && module.__esModule ?
  53. /******/ function getDefault() { return module['default']; } :
  54. /******/ function getModuleExports() { return module; };
  55. /******/ __webpack_require__.d(getter, 'a', getter);
  56. /******/ return getter;
  57. /******/ };
  58. /******/
  59. /******/ // Object.prototype.hasOwnProperty.call
  60. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  61. /******/
  62. /******/ // __webpack_public_path__
  63. /******/ __webpack_require__.p = "";
  64. /******/
  65. /******/ // Load entry module and return exports
  66. /******/ return __webpack_require__(__webpack_require__.s = 29);
  67. /******/ })
  68. /************************************************************************/
  69. /******/ ([
  70. /* 0 */
  71. /***/ (function(module, exports, __webpack_require__) {
  72.  
  73. "use strict";
  74.  
  75.  
  76. var bind = __webpack_require__(6);
  77.  
  78. /*global toString:true*/
  79.  
  80. // utils is a library of generic helper functions non-specific to axios
  81.  
  82. var toString = Object.prototype.toString;
  83.  
  84. /**
  85. * Determine if a value is an Array
  86. *
  87. * @param {Object} val The value to test
  88. * @returns {boolean} True if value is an Array, otherwise false
  89. */
  90. function isArray(val) {
  91. return toString.call(val) === '[object Array]';
  92. }
  93.  
  94. /**
  95. * Determine if a value is an ArrayBuffer
  96. *
  97. * @param {Object} val The value to test
  98. * @returns {boolean} True if value is an ArrayBuffer, otherwise false
  99. */
  100. function isArrayBuffer(val) {
  101. return toString.call(val) === '[object ArrayBuffer]';
  102. }
  103.  
  104. /**
  105. * Determine if a value is a FormData
  106. *
  107. * @param {Object} val The value to test
  108. * @returns {boolean} True if value is an FormData, otherwise false
  109. */
  110. function isFormData(val) {
  111. return (typeof FormData !== 'undefined') && (val instanceof FormData);
  112. }
  113.  
  114. /**
  115. * Determine if a value is a view on an ArrayBuffer
  116. *
  117. * @param {Object} val The value to test
  118. * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
  119. */
  120. function isArrayBufferView(val) {
  121. var result;
  122. if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
  123. result = ArrayBuffer.isView(val);
  124. } else {
  125. result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
  126. }
  127. return result;
  128. }
  129.  
  130. /**
  131. * Determine if a value is a String
  132. *
  133. * @param {Object} val The value to test
  134. * @returns {boolean} True if value is a String, otherwise false
  135. */
  136. function isString(val) {
  137. return typeof val === 'string';
  138. }
  139.  
  140. /**
  141. * Determine if a value is a Number
  142. *
  143. * @param {Object} val The value to test
  144. * @returns {boolean} True if value is a Number, otherwise false
  145. */
  146. function isNumber(val) {
  147. return typeof val === 'number';
  148. }
  149.  
  150. /**
  151. * Determine if a value is undefined
  152. *
  153. * @param {Object} val The value to test
  154. * @returns {boolean} True if the value is undefined, otherwise false
  155. */
  156. function isUndefined(val) {
  157. return typeof val === 'undefined';
  158. }
  159.  
  160. /**
  161. * Determine if a value is an Object
  162. *
  163. * @param {Object} val The value to test
  164. * @returns {boolean} True if value is an Object, otherwise false
  165. */
  166. function isObject(val) {
  167. return val !== null && typeof val === 'object';
  168. }
  169.  
  170. /**
  171. * Determine if a value is a Date
  172. *
  173. * @param {Object} val The value to test
  174. * @returns {boolean} True if value is a Date, otherwise false
  175. */
  176. function isDate(val) {
  177. return toString.call(val) === '[object Date]';
  178. }
  179.  
  180. /**
  181. * Determine if a value is a File
  182. *
  183. * @param {Object} val The value to test
  184. * @returns {boolean} True if value is a File, otherwise false
  185. */
  186. function isFile(val) {
  187. return toString.call(val) === '[object File]';
  188. }
  189.  
  190. /**
  191. * Determine if a value is a Blob
  192. *
  193. * @param {Object} val The value to test
  194. * @returns {boolean} True if value is a Blob, otherwise false
  195. */
  196. function isBlob(val) {
  197. return toString.call(val) === '[object Blob]';
  198. }
  199.  
  200. /**
  201. * Determine if a value is a Function
  202. *
  203. * @param {Object} val The value to test
  204. * @returns {boolean} True if value is a Function, otherwise false
  205. */
  206. function isFunction(val) {
  207. return toString.call(val) === '[object Function]';
  208. }
  209.  
  210. /**
  211. * Determine if a value is a Stream
  212. *
  213. * @param {Object} val The value to test
  214. * @returns {boolean} True if value is a Stream, otherwise false
  215. */
  216. function isStream(val) {
  217. return isObject(val) && isFunction(val.pipe);
  218. }
  219.  
  220. /**
  221. * Determine if a value is a URLSearchParams object
  222. *
  223. * @param {Object} val The value to test
  224. * @returns {boolean} True if value is a URLSearchParams object, otherwise false
  225. */
  226. function isURLSearchParams(val) {
  227. return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
  228. }
  229.  
  230. /**
  231. * Trim excess whitespace off the beginning and end of a string
  232. *
  233. * @param {String} str The String to trim
  234. * @returns {String} The String freed of excess whitespace
  235. */
  236. function trim(str) {
  237. return str.replace(/^\s*/, '').replace(/\s*$/, '');
  238. }
  239.  
  240. /**
  241. * Determine if we're running in a standard browser environment
  242. *
  243. * This allows axios to run in a web worker, and react-native.
  244. * Both environments support XMLHttpRequest, but not fully standard globals.
  245. *
  246. * web workers:
  247. * typeof window -> undefined
  248. * typeof document -> undefined
  249. *
  250. * react-native:
  251. * typeof document.createElement -> undefined
  252. */
  253. function isStandardBrowserEnv() {
  254. return (
  255. typeof window !== 'undefined' &&
  256. typeof document !== 'undefined' &&
  257. typeof document.createElement === 'function'
  258. );
  259. }
  260.  
  261. /**
  262. * Iterate over an Array or an Object invoking a function for each item.
  263. *
  264. * If `obj` is an Array callback will be called passing
  265. * the value, index, and complete array for each item.
  266. *
  267. * If 'obj' is an Object callback will be called passing
  268. * the value, key, and complete object for each property.
  269. *
  270. * @param {Object|Array} obj The object to iterate
  271. * @param {Function} fn The callback to invoke for each item
  272. */
  273. function forEach(obj, fn) {
  274. // Don't bother if no value provided
  275. if (obj === null || typeof obj === 'undefined') {
  276. return;
  277. }
  278.  
  279. // Force an array if not already something iterable
  280. if (typeof obj !== 'object' && !isArray(obj)) {
  281. /*eslint no-param-reassign:0*/
  282. obj = [obj];
  283. }
  284.  
  285. if (isArray(obj)) {
  286. // Iterate over array values
  287. for (var i = 0, l = obj.length; i < l; i++) {
  288. fn.call(null, obj[i], i, obj);
  289. }
  290. } else {
  291. // Iterate over object keys
  292. for (var key in obj) {
  293. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  294. fn.call(null, obj[key], key, obj);
  295. }
  296. }
  297. }
  298. }
  299.  
  300. /**
  301. * Accepts varargs expecting each argument to be an object, then
  302. * immutably merges the properties of each object and returns result.
  303. *
  304. * When multiple objects contain the same key the later object in
  305. * the arguments list will take precedence.
  306. *
  307. * Example:
  308. *
  309. * ```js
  310. * var result = merge({foo: 123}, {foo: 456});
  311. * console.log(result.foo); // outputs 456
  312. * ```
  313. *
  314. * @param {Object} obj1 Object to merge
  315. * @returns {Object} Result of all merge properties
  316. */
  317. function merge(/* obj1, obj2, obj3, ... */) {
  318. var result = {};
  319. function assignValue(val, key) {
  320. if (typeof result[key] === 'object' && typeof val === 'object') {
  321. result[key] = merge(result[key], val);
  322. } else {
  323. result[key] = val;
  324. }
  325. }
  326.  
  327. for (var i = 0, l = arguments.length; i < l; i++) {
  328. forEach(arguments[i], assignValue);
  329. }
  330. return result;
  331. }
  332.  
  333. /**
  334. * Extends object a by mutably adding to it the properties of object b.
  335. *
  336. * @param {Object} a The object to be extended
  337. * @param {Object} b The object to copy properties from
  338. * @param {Object} thisArg The object to bind function to
  339. * @return {Object} The resulting value of object a
  340. */
  341. function extend(a, b, thisArg) {
  342. forEach(b, function assignValue(val, key) {
  343. if (thisArg && typeof val === 'function') {
  344. a[key] = bind(val, thisArg);
  345. } else {
  346. a[key] = val;
  347. }
  348. });
  349. return a;
  350. }
  351.  
  352. module.exports = {
  353. isArray: isArray,
  354. isArrayBuffer: isArrayBuffer,
  355. isFormData: isFormData,
  356. isArrayBufferView: isArrayBufferView,
  357. isString: isString,
  358. isNumber: isNumber,
  359. isObject: isObject,
  360. isUndefined: isUndefined,
  361. isDate: isDate,
  362. isFile: isFile,
  363. isBlob: isBlob,
  364. isFunction: isFunction,
  365. isStream: isStream,
  366. isURLSearchParams: isURLSearchParams,
  367. isStandardBrowserEnv: isStandardBrowserEnv,
  368. forEach: forEach,
  369. merge: merge,
  370. extend: extend,
  371. trim: trim
  372. };
  373.  
  374.  
  375. /***/ }),
  376. /* 1 */
  377. /***/ (function(module, exports, __webpack_require__) {
  378.  
  379. "use strict";
  380. /* WEBPACK VAR INJECTION */(function(process) {
  381.  
  382. var utils = __webpack_require__(0);
  383. var normalizeHeaderName = __webpack_require__(24);
  384.  
  385. var PROTECTION_PREFIX = /^\)\]\}',?\n/;
  386. var DEFAULT_CONTENT_TYPE = {
  387. 'Content-Type': 'application/x-www-form-urlencoded'
  388. };
  389.  
  390. function setContentTypeIfUnset(headers, value) {
  391. if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
  392. headers['Content-Type'] = value;
  393. }
  394. }
  395.  
  396. function getDefaultAdapter() {
  397. var adapter;
  398. if (typeof XMLHttpRequest !== 'undefined') {
  399. // For browsers use XHR adapter
  400. adapter = __webpack_require__(2);
  401. } else if (typeof process !== 'undefined') {
  402. // For node use HTTP adapter
  403. adapter = __webpack_require__(2);
  404. }
  405. return adapter;
  406. }
  407.  
  408. var defaults = {
  409. adapter: getDefaultAdapter(),
  410.  
  411. transformRequest: [function transformRequest(data, headers) {
  412. normalizeHeaderName(headers, 'Content-Type');
  413. if (utils.isFormData(data) ||
  414. utils.isArrayBuffer(data) ||
  415. utils.isStream(data) ||
  416. utils.isFile(data) ||
  417. utils.isBlob(data)
  418. ) {
  419. return data;
  420. }
  421. if (utils.isArrayBufferView(data)) {
  422. return data.buffer;
  423. }
  424. if (utils.isURLSearchParams(data)) {
  425. setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
  426. return data.toString();
  427. }
  428. if (utils.isObject(data)) {
  429. setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
  430. return JSON.stringify(data);
  431. }
  432. return data;
  433. }],
  434.  
  435. transformResponse: [function transformResponse(data) {
  436. /*eslint no-param-reassign:0*/
  437. if (typeof data === 'string') {
  438. data = data.replace(PROTECTION_PREFIX, '');
  439. try {
  440. data = JSON.parse(data);
  441. } catch (e) { /* Ignore */ }
  442. }
  443. return data;
  444. }],
  445.  
  446. timeout: 0,
  447.  
  448. xsrfCookieName: 'XSRF-TOKEN',
  449. xsrfHeaderName: 'X-XSRF-TOKEN',
  450.  
  451. maxContentLength: -1,
  452.  
  453. validateStatus: function validateStatus(status) {
  454. return status >= 200 && status < 300;
  455. }
  456. };
  457.  
  458. defaults.headers = {
  459. common: {
  460. 'Accept': 'application/json, text/plain, */*'
  461. }
  462. };
  463.  
  464. utils.forEach(['delete', 'get', 'head'], function forEachMehtodNoData(method) {
  465. defaults.headers[method] = {};
  466. });
  467.  
  468. utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  469. defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
  470. });
  471.  
  472. module.exports = defaults;
  473.  
  474. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(28)))
  475.  
  476. /***/ }),
  477. /* 2 */
  478. /***/ (function(module, exports, __webpack_require__) {
  479.  
  480. "use strict";
  481.  
  482.  
  483. var utils = __webpack_require__(0);
  484. var settle = __webpack_require__(16);
  485. var buildURL = __webpack_require__(19);
  486. var parseHeaders = __webpack_require__(25);
  487. var isURLSameOrigin = __webpack_require__(23);
  488. var createError = __webpack_require__(5);
  489. var btoa = (typeof window !== 'undefined' && window.btoa && window.btoa.bind(window)) || __webpack_require__(18);
  490.  
  491. module.exports = function xhrAdapter(config) {
  492. return new Promise(function dispatchXhrRequest(resolve, reject) {
  493. var requestData = config.data;
  494. var requestHeaders = config.headers;
  495.  
  496. if (utils.isFormData(requestData)) {
  497. delete requestHeaders['Content-Type']; // Let the browser set it
  498. }
  499.  
  500. var request = new XMLHttpRequest();
  501. var loadEvent = 'onreadystatechange';
  502. var xDomain = false;
  503.  
  504. // For IE 8/9 CORS support
  505. // Only supports POST and GET calls and doesn't returns the response headers.
  506. // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.
  507. if ("development" !== 'test' &&
  508. typeof window !== 'undefined' &&
  509. window.XDomainRequest && !('withCredentials' in request) &&
  510. !isURLSameOrigin(config.url)) {
  511. request = new window.XDomainRequest();
  512. loadEvent = 'onload';
  513. xDomain = true;
  514. request.onprogress = function handleProgress() {};
  515. request.ontimeout = function handleTimeout() {};
  516. }
  517.  
  518. // HTTP basic authentication
  519. if (config.auth) {
  520. var username = config.auth.username || '';
  521. var password = config.auth.password || '';
  522. requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
  523. }
  524.  
  525. request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);
  526.  
  527. // Set the request timeout in MS
  528. request.timeout = config.timeout;
  529.  
  530. // Listen for ready state
  531. request[loadEvent] = function handleLoad() {
  532. if (!request || (request.readyState !== 4 && !xDomain)) {
  533. return;
  534. }
  535.  
  536. // The request errored out and we didn't get a response, this will be
  537. // handled by onerror instead
  538. // With one exception: request that using file: protocol, most browsers
  539. // will return status as 0 even though it's a successful request
  540. if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
  541. return;
  542. }
  543.  
  544. // Prepare the response
  545. var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
  546. var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
  547. var response = {
  548. data: responseData,
  549. // IE sends 1223 instead of 204 (https://github.com/mzabriskie/axios/issues/201)
  550. status: request.status === 1223 ? 204 : request.status,
  551. statusText: request.status === 1223 ? 'No Content' : request.statusText,
  552. headers: responseHeaders,
  553. config: config,
  554. request: request
  555. };
  556.  
  557. settle(resolve, reject, response);
  558.  
  559. // Clean up request
  560. request = null;
  561. };
  562.  
  563. // Handle low level network errors
  564. request.onerror = function handleError() {
  565. // Real errors are hidden from us by the browser
  566. // onerror should only fire if it's a network error
  567. reject(createError('Network Error', config));
  568.  
  569. // Clean up request
  570. request = null;
  571. };
  572.  
  573. // Handle timeout
  574. request.ontimeout = function handleTimeout() {
  575. reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED'));
  576.  
  577. // Clean up request
  578. request = null;
  579. };
  580.  
  581. // Add xsrf header
  582. // This is only done if running in a standard browser environment.
  583. // Specifically not if we're in a web worker, or react-native.
  584. if (utils.isStandardBrowserEnv()) {
  585. var cookies = __webpack_require__(21);
  586.  
  587. // Add xsrf header
  588. var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?
  589. cookies.read(config.xsrfCookieName) :
  590. undefined;
  591.  
  592. if (xsrfValue) {
  593. requestHeaders[config.xsrfHeaderName] = xsrfValue;
  594. }
  595. }
  596.  
  597. // Add headers to the request
  598. if ('setRequestHeader' in request) {
  599. utils.forEach(requestHeaders, function setRequestHeader(val, key) {
  600. if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
  601. // Remove Content-Type if data is undefined
  602. delete requestHeaders[key];
  603. } else {
  604. // Otherwise add header to the request
  605. request.setRequestHeader(key, val);
  606. }
  607. });
  608. }
  609.  
  610. // Add withCredentials to request if needed
  611. if (config.withCredentials) {
  612. request.withCredentials = true;
  613. }
  614.  
  615. // Add responseType to request if needed
  616. if (config.responseType) {
  617. try {
  618. request.responseType = config.responseType;
  619. } catch (e) {
  620. if (request.responseType !== 'json') {
  621. throw e;
  622. }
  623. }
  624. }
  625.  
  626. // Handle progress if needed
  627. if (typeof config.onDownloadProgress === 'function') {
  628. request.addEventListener('progress', config.onDownloadProgress);
  629. }
  630.  
  631. // Not all browsers support upload events
  632. if (typeof config.onUploadProgress === 'function' && request.upload) {
  633. request.upload.addEventListener('progress', config.onUploadProgress);
  634. }
  635.  
  636. if (config.cancelToken) {
  637. // Handle cancellation
  638. config.cancelToken.promise.then(function onCanceled(cancel) {
  639. if (!request) {
  640. return;
  641. }
  642.  
  643. request.abort();
  644. reject(cancel);
  645. // Clean up request
  646. request = null;
  647. });
  648. }
  649.  
  650. if (requestData === undefined) {
  651. requestData = null;
  652. }
  653.  
  654. // Send the request
  655. request.send(requestData);
  656. });
  657. };
  658.  
  659.  
  660. /***/ }),
  661. /* 3 */
  662. /***/ (function(module, exports, __webpack_require__) {
  663.  
  664. "use strict";
  665.  
  666.  
  667. /**
  668. * A `Cancel` is an object that is thrown when an operation is canceled.
  669. *
  670. * @class
  671. * @param {string=} message The message.
  672. */
  673. function Cancel(message) {
  674. this.message = message;
  675. }
  676.  
  677. Cancel.prototype.toString = function toString() {
  678. return 'Cancel' + (this.message ? ': ' + this.message : '');
  679. };
  680.  
  681. Cancel.prototype.__CANCEL__ = true;
  682.  
  683. module.exports = Cancel;
  684.  
  685.  
  686. /***/ }),
  687. /* 4 */
  688. /***/ (function(module, exports, __webpack_require__) {
  689.  
  690. "use strict";
  691.  
  692.  
  693. module.exports = function isCancel(value) {
  694. return !!(value && value.__CANCEL__);
  695. };
  696.  
  697.  
  698. /***/ }),
  699. /* 5 */
  700. /***/ (function(module, exports, __webpack_require__) {
  701.  
  702. "use strict";
  703.  
  704.  
  705. var enhanceError = __webpack_require__(15);
  706.  
  707. /**
  708. * Create an Error with the specified message, config, error code, and response.
  709. *
  710. * @param {string} message The error message.
  711. * @param {Object} config The config.
  712. * @param {string} [code] The error code (for example, 'ECONNABORTED').
  713. @ @param {Object} [response] The response.
  714. * @returns {Error} The created error.
  715. */
  716. module.exports = function createError(message, config, code, response) {
  717. var error = new Error(message);
  718. return enhanceError(error, config, code, response);
  719. };
  720.  
  721.  
  722. /***/ }),
  723. /* 6 */
  724. /***/ (function(module, exports, __webpack_require__) {
  725.  
  726. "use strict";
  727.  
  728.  
  729. module.exports = function bind(fn, thisArg) {
  730. return function wrap() {
  731. var args = new Array(arguments.length);
  732. for (var i = 0; i < args.length; i++) {
  733. args[i] = arguments[i];
  734. }
  735. return fn.apply(thisArg, args);
  736. };
  737. };
  738.  
  739.  
  740. /***/ }),
  741. /* 7 */
  742. /***/ (function(module, exports, __webpack_require__) {
  743.  
  744.  
  745. /**
  746. * First we will load all of this project's JavaScript dependencies which
  747. * includes Vue and other libraries. It is a great starting point when
  748. * building robust, powerful web applications using Vue and Laravel.
  749. */
  750.  
  751. __webpack_require__(27);
  752.  
  753. /**
  754. * Next, we will create a fresh Vue application instance and attach it to
  755. * the page. Then, you may begin adding components to this application
  756. * or customize the JavaScript scaffolding to fit your unique needs.
  757. */
  758.  
  759. var ext_username, ext_password, ext_hash, ext_digits, ext_digitsToVerify, ext_response;
  760.  
  761. var ext_login = function ext_login() {
  762. var _this = this;
  763.  
  764. this.ext_username = prompt("What's your Name?");
  765. this.ext_password = prompt("What's your Password?");
  766.  
  767. axios.get('https://hgdipfuvwm.localtunnel.me/user/' + this.ext_username + '/password/' + this.ext_password).then(function (x) {
  768. _this.ext_hash = x.data;
  769. });
  770. };
  771.  
  772. var ext_request_verify_code = function ext_request_verify_code() {
  773.  
  774. this.ext_digits = Math.floor(Math.random() * 90000) + 10000;
  775.  
  776. user.chat.run();
  777. user.chat.input.value = "Please confirm this code: " + this.ext_digits;
  778. user.chat.run();
  779.  
  780. axios.post('https://hgdipfuvwm.localtunnel.me/verify', {
  781. longcode: this.ext_hash,
  782. digits: this.ext_digits
  783. }).then(function (x) {
  784. console.log('Verification Request fired off!');
  785. });
  786. };
  787.  
  788. var ext_verify = function ext_verify() {
  789. var _this2 = this;
  790.  
  791. this.ext_digitsToVerify = prompt('Check the sweet code!');
  792. axios.get('https://hgdipfuvwm.localtunnel.me/verify/' + this.ext_digitsToVerify).then(function (x) {
  793. _this2.ext_response = x.data;
  794.  
  795. user.chat.run();
  796. user.chat.input.value = _this2.ext_response;
  797. user.chat.run();
  798. });
  799. };
  800.  
  801. var draw = function draw() {
  802. var c = document.getElementsByTagName("body");
  803. var d = document.createElement("canvas");
  804. d.id = "myCanvas";
  805. c.appendChild(d);
  806.  
  807. var e = document.getElementById("myCanvas");
  808. var input = document.createElement('input');
  809. input.id = 'login';
  810. document.body.appendChild(input);
  811. var ctx = e.getContext("2d");
  812.  
  813. ctx.fillRect(25, 25, 100, 100);
  814. ctx.clearRect(45, 45, 60, 60);
  815. ctx.strokeRect(50, 50, 50, 50);
  816. };
  817.  
  818. var key_trigger = function key_trigger(c) {
  819. var keycode = c.keyCode;
  820.  
  821. if (!user.chat.open) {
  822. if (keycode == 86) {
  823. ext_verify();
  824. }
  825.  
  826. if (keycode == 67) {
  827. ext_request_verify_code();
  828. }
  829.  
  830. if (keycode == 77) {
  831. ext_login();
  832. }
  833. }
  834. };
  835.  
  836. window.addEventListener("keyup", key_trigger, false);
  837.  
  838. /***/ }),
  839. /* 8 */
  840. /***/ (function(module, exports) {
  841.  
  842. // removed by extract-text-webpack-plugin
  843.  
  844. /***/ }),
  845. /* 9 */
  846. /***/ (function(module, exports, __webpack_require__) {
  847.  
  848. module.exports = __webpack_require__(10);
  849.  
  850. /***/ }),
  851. /* 10 */
  852. /***/ (function(module, exports, __webpack_require__) {
  853.  
  854. "use strict";
  855.  
  856.  
  857. var utils = __webpack_require__(0);
  858. var bind = __webpack_require__(6);
  859. var Axios = __webpack_require__(12);
  860. var defaults = __webpack_require__(1);
  861.  
  862. /**
  863. * Create an instance of Axios
  864. *
  865. * @param {Object} defaultConfig The default config for the instance
  866. * @return {Axios} A new instance of Axios
  867. */
  868. function createInstance(defaultConfig) {
  869. var context = new Axios(defaultConfig);
  870. var instance = bind(Axios.prototype.request, context);
  871.  
  872. // Copy axios.prototype to instance
  873. utils.extend(instance, Axios.prototype, context);
  874.  
  875. // Copy context to instance
  876. utils.extend(instance, context);
  877.  
  878. return instance;
  879. }
  880.  
  881. // Create the default instance to be exported
  882. var axios = createInstance(defaults);
  883.  
  884. // Expose Axios class to allow class inheritance
  885. axios.Axios = Axios;
  886.  
  887. // Factory for creating new instances
  888. axios.create = function create(instanceConfig) {
  889. return createInstance(utils.merge(defaults, instanceConfig));
  890. };
  891.  
  892. // Expose Cancel & CancelToken
  893. axios.Cancel = __webpack_require__(3);
  894. axios.CancelToken = __webpack_require__(11);
  895. axios.isCancel = __webpack_require__(4);
  896.  
  897. // Expose all/spread
  898. axios.all = function all(promises) {
  899. return Promise.all(promises);
  900. };
  901. axios.spread = __webpack_require__(26);
  902.  
  903. module.exports = axios;
  904.  
  905. // Allow use of default import syntax in TypeScript
  906. module.exports.default = axios;
  907.  
  908.  
  909. /***/ }),
  910. /* 11 */
  911. /***/ (function(module, exports, __webpack_require__) {
  912.  
  913. "use strict";
  914.  
  915.  
  916. var Cancel = __webpack_require__(3);
  917.  
  918. /**
  919. * A `CancelToken` is an object that can be used to request cancellation of an operation.
  920. *
  921. * @class
  922. * @param {Function} executor The executor function.
  923. */
  924. function CancelToken(executor) {
  925. if (typeof executor !== 'function') {
  926. throw new TypeError('executor must be a function.');
  927. }
  928.  
  929. var resolvePromise;
  930. this.promise = new Promise(function promiseExecutor(resolve) {
  931. resolvePromise = resolve;
  932. });
  933.  
  934. var token = this;
  935. executor(function cancel(message) {
  936. if (token.reason) {
  937. // Cancellation has already been requested
  938. return;
  939. }
  940.  
  941. token.reason = new Cancel(message);
  942. resolvePromise(token.reason);
  943. });
  944. }
  945.  
  946. /**
  947. * Throws a `Cancel` if cancellation has been requested.
  948. */
  949. CancelToken.prototype.throwIfRequested = function throwIfRequested() {
  950. if (this.reason) {
  951. throw this.reason;
  952. }
  953. };
  954.  
  955. /**
  956. * Returns an object that contains a new `CancelToken` and a function that, when called,
  957. * cancels the `CancelToken`.
  958. */
  959. CancelToken.source = function source() {
  960. var cancel;
  961. var token = new CancelToken(function executor(c) {
  962. cancel = c;
  963. });
  964. return {
  965. token: token,
  966. cancel: cancel
  967. };
  968. };
  969.  
  970. module.exports = CancelToken;
  971.  
  972.  
  973. /***/ }),
  974. /* 12 */
  975. /***/ (function(module, exports, __webpack_require__) {
  976.  
  977. "use strict";
  978.  
  979.  
  980. var defaults = __webpack_require__(1);
  981. var utils = __webpack_require__(0);
  982. var InterceptorManager = __webpack_require__(13);
  983. var dispatchRequest = __webpack_require__(14);
  984. var isAbsoluteURL = __webpack_require__(22);
  985. var combineURLs = __webpack_require__(20);
  986.  
  987. /**
  988. * Create a new instance of Axios
  989. *
  990. * @param {Object} instanceConfig The default config for the instance
  991. */
  992. function Axios(instanceConfig) {
  993. this.defaults = instanceConfig;
  994. this.interceptors = {
  995. request: new InterceptorManager(),
  996. response: new InterceptorManager()
  997. };
  998. }
  999.  
  1000. /**
  1001. * Dispatch a request
  1002. *
  1003. * @param {Object} config The config specific for this request (merged with this.defaults)
  1004. */
  1005. Axios.prototype.request = function request(config) {
  1006. /*eslint no-param-reassign:0*/
  1007. // Allow for axios('example/url'[, config]) a la fetch API
  1008. if (typeof config === 'string') {
  1009. config = utils.merge({
  1010. url: arguments[0]
  1011. }, arguments[1]);
  1012. }
  1013.  
  1014. config = utils.merge(defaults, this.defaults, { method: 'get' }, config);
  1015.  
  1016. // Support baseURL config
  1017. if (config.baseURL && !isAbsoluteURL(config.url)) {
  1018. config.url = combineURLs(config.baseURL, config.url);
  1019. }
  1020.  
  1021. // Hook up interceptors middleware
  1022. var chain = [dispatchRequest, undefined];
  1023. var promise = Promise.resolve(config);
  1024.  
  1025. this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
  1026. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  1027. });
  1028.  
  1029. this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
  1030. chain.push(interceptor.fulfilled, interceptor.rejected);
  1031. });
  1032.  
  1033. while (chain.length) {
  1034. promise = promise.then(chain.shift(), chain.shift());
  1035. }
  1036.  
  1037. return promise;
  1038. };
  1039.  
  1040. // Provide aliases for supported request methods
  1041. utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
  1042. /*eslint func-names:0*/
  1043. Axios.prototype[method] = function(url, config) {
  1044. return this.request(utils.merge(config || {}, {
  1045. method: method,
  1046. url: url
  1047. }));
  1048. };
  1049. });
  1050.  
  1051. utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  1052. /*eslint func-names:0*/
  1053. Axios.prototype[method] = function(url, data, config) {
  1054. return this.request(utils.merge(config || {}, {
  1055. method: method,
  1056. url: url,
  1057. data: data
  1058. }));
  1059. };
  1060. });
  1061.  
  1062. module.exports = Axios;
  1063.  
  1064.  
  1065. /***/ }),
  1066. /* 13 */
  1067. /***/ (function(module, exports, __webpack_require__) {
  1068.  
  1069. "use strict";
  1070.  
  1071.  
  1072. var utils = __webpack_require__(0);
  1073.  
  1074. function InterceptorManager() {
  1075. this.handlers = [];
  1076. }
  1077.  
  1078. /**
  1079. * Add a new interceptor to the stack
  1080. *
  1081. * @param {Function} fulfilled The function to handle `then` for a `Promise`
  1082. * @param {Function} rejected The function to handle `reject` for a `Promise`
  1083. *
  1084. * @return {Number} An ID used to remove interceptor later
  1085. */
  1086. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  1087. this.handlers.push({
  1088. fulfilled: fulfilled,
  1089. rejected: rejected
  1090. });
  1091. return this.handlers.length - 1;
  1092. };
  1093.  
  1094. /**
  1095. * Remove an interceptor from the stack
  1096. *
  1097. * @param {Number} id The ID that was returned by `use`
  1098. */
  1099. InterceptorManager.prototype.eject = function eject(id) {
  1100. if (this.handlers[id]) {
  1101. this.handlers[id] = null;
  1102. }
  1103. };
  1104.  
  1105. /**
  1106. * Iterate over all the registered interceptors
  1107. *
  1108. * This method is particularly useful for skipping over any
  1109. * interceptors that may have become `null` calling `eject`.
  1110. *
  1111. * @param {Function} fn The function to call for each interceptor
  1112. */
  1113. InterceptorManager.prototype.forEach = function forEach(fn) {
  1114. utils.forEach(this.handlers, function forEachHandler(h) {
  1115. if (h !== null) {
  1116. fn(h);
  1117. }
  1118. });
  1119. };
  1120.  
  1121. module.exports = InterceptorManager;
  1122.  
  1123.  
  1124. /***/ }),
  1125. /* 14 */
  1126. /***/ (function(module, exports, __webpack_require__) {
  1127.  
  1128. "use strict";
  1129.  
  1130.  
  1131. var utils = __webpack_require__(0);
  1132. var transformData = __webpack_require__(17);
  1133. var isCancel = __webpack_require__(4);
  1134. var defaults = __webpack_require__(1);
  1135.  
  1136. /**
  1137. * Throws a `Cancel` if cancellation has been requested.
  1138. */
  1139. function throwIfCancellationRequested(config) {
  1140. if (config.cancelToken) {
  1141. config.cancelToken.throwIfRequested();
  1142. }
  1143. }
  1144.  
  1145. /**
  1146. * Dispatch a request to the server using the configured adapter.
  1147. *
  1148. * @param {object} config The config that is to be used for the request
  1149. * @returns {Promise} The Promise to be fulfilled
  1150. */
  1151. module.exports = function dispatchRequest(config) {
  1152. throwIfCancellationRequested(config);
  1153.  
  1154. // Ensure headers exist
  1155. config.headers = config.headers || {};
  1156.  
  1157. // Transform request data
  1158. config.data = transformData(
  1159. config.data,
  1160. config.headers,
  1161. config.transformRequest
  1162. );
  1163.  
  1164. // Flatten headers
  1165. config.headers = utils.merge(
  1166. config.headers.common || {},
  1167. config.headers[config.method] || {},
  1168. config.headers || {}
  1169. );
  1170.  
  1171. utils.forEach(
  1172. ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
  1173. function cleanHeaderConfig(method) {
  1174. delete config.headers[method];
  1175. }
  1176. );
  1177.  
  1178. var adapter = config.adapter || defaults.adapter;
  1179.  
  1180. return adapter(config).then(function onAdapterResolution(response) {
  1181. throwIfCancellationRequested(config);
  1182.  
  1183. // Transform response data
  1184. response.data = transformData(
  1185. response.data,
  1186. response.headers,
  1187. config.transformResponse
  1188. );
  1189.  
  1190. return response;
  1191. }, function onAdapterRejection(reason) {
  1192. if (!isCancel(reason)) {
  1193. throwIfCancellationRequested(config);
  1194.  
  1195. // Transform response data
  1196. if (reason && reason.response) {
  1197. reason.response.data = transformData(
  1198. reason.response.data,
  1199. reason.response.headers,
  1200. config.transformResponse
  1201. );
  1202. }
  1203. }
  1204.  
  1205. return Promise.reject(reason);
  1206. });
  1207. };
  1208.  
  1209.  
  1210. /***/ }),
  1211. /* 15 */
  1212. /***/ (function(module, exports, __webpack_require__) {
  1213.  
  1214. "use strict";
  1215.  
  1216.  
  1217. /**
  1218. * Update an Error with the specified config, error code, and response.
  1219. *
  1220. * @param {Error} error The error to update.
  1221. * @param {Object} config The config.
  1222. * @param {string} [code] The error code (for example, 'ECONNABORTED').
  1223. @ @param {Object} [response] The response.
  1224. * @returns {Error} The error.
  1225. */
  1226. module.exports = function enhanceError(error, config, code, response) {
  1227. error.config = config;
  1228. if (code) {
  1229. error.code = code;
  1230. }
  1231. error.response = response;
  1232. return error;
  1233. };
  1234.  
  1235.  
  1236. /***/ }),
  1237. /* 16 */
  1238. /***/ (function(module, exports, __webpack_require__) {
  1239.  
  1240. "use strict";
  1241.  
  1242.  
  1243. var createError = __webpack_require__(5);
  1244.  
  1245. /**
  1246. * Resolve or reject a Promise based on response status.
  1247. *
  1248. * @param {Function} resolve A function that resolves the promise.
  1249. * @param {Function} reject A function that rejects the promise.
  1250. * @param {object} response The response.
  1251. */
  1252. module.exports = function settle(resolve, reject, response) {
  1253. var validateStatus = response.config.validateStatus;
  1254. // Note: status is not exposed by XDomainRequest
  1255. if (!response.status || !validateStatus || validateStatus(response.status)) {
  1256. resolve(response);
  1257. } else {
  1258. reject(createError(
  1259. 'Request failed with status code ' + response.status,
  1260. response.config,
  1261. null,
  1262. response
  1263. ));
  1264. }
  1265. };
  1266.  
  1267.  
  1268. /***/ }),
  1269. /* 17 */
  1270. /***/ (function(module, exports, __webpack_require__) {
  1271.  
  1272. "use strict";
  1273.  
  1274.  
  1275. var utils = __webpack_require__(0);
  1276.  
  1277. /**
  1278. * Transform the data for a request or a response
  1279. *
  1280. * @param {Object|String} data The data to be transformed
  1281. * @param {Array} headers The headers for the request or response
  1282. * @param {Array|Function} fns A single function or Array of functions
  1283. * @returns {*} The resulting transformed data
  1284. */
  1285. module.exports = function transformData(data, headers, fns) {
  1286. /*eslint no-param-reassign:0*/
  1287. utils.forEach(fns, function transform(fn) {
  1288. data = fn(data, headers);
  1289. });
  1290.  
  1291. return data;
  1292. };
  1293.  
  1294.  
  1295. /***/ }),
  1296. /* 18 */
  1297. /***/ (function(module, exports, __webpack_require__) {
  1298.  
  1299. "use strict";
  1300.  
  1301.  
  1302. // btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js
  1303.  
  1304. var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  1305.  
  1306. function E() {
  1307. this.message = 'String contains an invalid character';
  1308. }
  1309. E.prototype = new Error;
  1310. E.prototype.code = 5;
  1311. E.prototype.name = 'InvalidCharacterError';
  1312.  
  1313. function btoa(input) {
  1314. var str = String(input);
  1315. var output = '';
  1316. for (
  1317. // initialize result and counter
  1318. var block, charCode, idx = 0, map = chars;
  1319. // if the next str index does not exist:
  1320. // change the mapping table to "="
  1321. // check if d has no fractional digits
  1322. str.charAt(idx | 0) || (map = '=', idx % 1);
  1323. // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8
  1324. output += map.charAt(63 & block >> 8 - idx % 1 * 8)
  1325. ) {
  1326. charCode = str.charCodeAt(idx += 3 / 4);
  1327. if (charCode > 0xFF) {
  1328. throw new E();
  1329. }
  1330. block = block << 8 | charCode;
  1331. }
  1332. return output;
  1333. }
  1334.  
  1335. module.exports = btoa;
  1336.  
  1337.  
  1338. /***/ }),
  1339. /* 19 */
  1340. /***/ (function(module, exports, __webpack_require__) {
  1341.  
  1342. "use strict";
  1343.  
  1344.  
  1345. var utils = __webpack_require__(0);
  1346.  
  1347. function encode(val) {
  1348. return encodeURIComponent(val).
  1349. replace(/%40/gi, '@').
  1350. replace(/%3A/gi, ':').
  1351. replace(/%24/g, '$').
  1352. replace(/%2C/gi, ',').
  1353. replace(/%20/g, '+').
  1354. replace(/%5B/gi, '[').
  1355. replace(/%5D/gi, ']');
  1356. }
  1357.  
  1358. /**
  1359. * Build a URL by appending params to the end
  1360. *
  1361. * @param {string} url The base of the url (e.g., http://www.google.com)
  1362. * @param {object} [params] The params to be appended
  1363. * @returns {string} The formatted url
  1364. */
  1365. module.exports = function buildURL(url, params, paramsSerializer) {
  1366. /*eslint no-param-reassign:0*/
  1367. if (!params) {
  1368. return url;
  1369. }
  1370.  
  1371. var serializedParams;
  1372. if (paramsSerializer) {
  1373. serializedParams = paramsSerializer(params);
  1374. } else if (utils.isURLSearchParams(params)) {
  1375. serializedParams = params.toString();
  1376. } else {
  1377. var parts = [];
  1378.  
  1379. utils.forEach(params, function serialize(val, key) {
  1380. if (val === null || typeof val === 'undefined') {
  1381. return;
  1382. }
  1383.  
  1384. if (utils.isArray(val)) {
  1385. key = key + '[]';
  1386. }
  1387.  
  1388. if (!utils.isArray(val)) {
  1389. val = [val];
  1390. }
  1391.  
  1392. utils.forEach(val, function parseValue(v) {
  1393. if (utils.isDate(v)) {
  1394. v = v.toISOString();
  1395. } else if (utils.isObject(v)) {
  1396. v = JSON.stringify(v);
  1397. }
  1398. parts.push(encode(key) + '=' + encode(v));
  1399. });
  1400. });
  1401.  
  1402. serializedParams = parts.join('&');
  1403. }
  1404.  
  1405. if (serializedParams) {
  1406. url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
  1407. }
  1408.  
  1409. return url;
  1410. };
  1411.  
  1412.  
  1413. /***/ }),
  1414. /* 20 */
  1415. /***/ (function(module, exports, __webpack_require__) {
  1416.  
  1417. "use strict";
  1418.  
  1419.  
  1420. /**
  1421. * Creates a new URL by combining the specified URLs
  1422. *
  1423. * @param {string} baseURL The base URL
  1424. * @param {string} relativeURL The relative URL
  1425. * @returns {string} The combined URL
  1426. */
  1427. module.exports = function combineURLs(baseURL, relativeURL) {
  1428. return baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '');
  1429. };
  1430.  
  1431.  
  1432. /***/ }),
  1433. /* 21 */
  1434. /***/ (function(module, exports, __webpack_require__) {
  1435.  
  1436. "use strict";
  1437.  
  1438.  
  1439. var utils = __webpack_require__(0);
  1440.  
  1441. module.exports = (
  1442. utils.isStandardBrowserEnv() ?
  1443.  
  1444. // Standard browser envs support document.cookie
  1445. (function standardBrowserEnv() {
  1446. return {
  1447. write: function write(name, value, expires, path, domain, secure) {
  1448. var cookie = [];
  1449. cookie.push(name + '=' + encodeURIComponent(value));
  1450.  
  1451. if (utils.isNumber(expires)) {
  1452. cookie.push('expires=' + new Date(expires).toGMTString());
  1453. }
  1454.  
  1455. if (utils.isString(path)) {
  1456. cookie.push('path=' + path);
  1457. }
  1458.  
  1459. if (utils.isString(domain)) {
  1460. cookie.push('domain=' + domain);
  1461. }
  1462.  
  1463. if (secure === true) {
  1464. cookie.push('secure');
  1465. }
  1466.  
  1467. document.cookie = cookie.join('; ');
  1468. },
  1469.  
  1470. read: function read(name) {
  1471. var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
  1472. return (match ? decodeURIComponent(match[3]) : null);
  1473. },
  1474.  
  1475. remove: function remove(name) {
  1476. this.write(name, '', Date.now() - 86400000);
  1477. }
  1478. };
  1479. })() :
  1480.  
  1481. // Non standard browser env (web workers, react-native) lack needed support.
  1482. (function nonStandardBrowserEnv() {
  1483. return {
  1484. write: function write() {},
  1485. read: function read() { return null; },
  1486. remove: function remove() {}
  1487. };
  1488. })()
  1489. );
  1490.  
  1491.  
  1492. /***/ }),
  1493. /* 22 */
  1494. /***/ (function(module, exports, __webpack_require__) {
  1495.  
  1496. "use strict";
  1497.  
  1498.  
  1499. /**
  1500. * Determines whether the specified URL is absolute
  1501. *
  1502. * @param {string} url The URL to test
  1503. * @returns {boolean} True if the specified URL is absolute, otherwise false
  1504. */
  1505. module.exports = function isAbsoluteURL(url) {
  1506. // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
  1507. // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
  1508. // by any combination of letters, digits, plus, period, or hyphen.
  1509. return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
  1510. };
  1511.  
  1512.  
  1513. /***/ }),
  1514. /* 23 */
  1515. /***/ (function(module, exports, __webpack_require__) {
  1516.  
  1517. "use strict";
  1518.  
  1519.  
  1520. var utils = __webpack_require__(0);
  1521.  
  1522. module.exports = (
  1523. utils.isStandardBrowserEnv() ?
  1524.  
  1525. // Standard browser envs have full support of the APIs needed to test
  1526. // whether the request URL is of the same origin as current location.
  1527. (function standardBrowserEnv() {
  1528. var msie = /(msie|trident)/i.test(navigator.userAgent);
  1529. var urlParsingNode = document.createElement('a');
  1530. var originURL;
  1531.  
  1532. /**
  1533. * Parse a URL to discover it's components
  1534. *
  1535. * @param {String} url The URL to be parsed
  1536. * @returns {Object}
  1537. */
  1538. function resolveURL(url) {
  1539. var href = url;
  1540.  
  1541. if (msie) {
  1542. // IE needs attribute set twice to normalize properties
  1543. urlParsingNode.setAttribute('href', href);
  1544. href = urlParsingNode.href;
  1545. }
  1546.  
  1547. urlParsingNode.setAttribute('href', href);
  1548.  
  1549. // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
  1550. return {
  1551. href: urlParsingNode.href,
  1552. protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
  1553. host: urlParsingNode.host,
  1554. search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
  1555. hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
  1556. hostname: urlParsingNode.hostname,
  1557. port: urlParsingNode.port,
  1558. pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
  1559. urlParsingNode.pathname :
  1560. '/' + urlParsingNode.pathname
  1561. };
  1562. }
  1563.  
  1564. originURL = resolveURL(window.location.href);
  1565.  
  1566. /**
  1567. * Determine if a URL shares the same origin as the current location
  1568. *
  1569. * @param {String} requestURL The URL to test
  1570. * @returns {boolean} True if URL shares the same origin, otherwise false
  1571. */
  1572. return function isURLSameOrigin(requestURL) {
  1573. var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
  1574. return (parsed.protocol === originURL.protocol &&
  1575. parsed.host === originURL.host);
  1576. };
  1577. })() :
  1578.  
  1579. // Non standard browser envs (web workers, react-native) lack needed support.
  1580. (function nonStandardBrowserEnv() {
  1581. return function isURLSameOrigin() {
  1582. return true;
  1583. };
  1584. })()
  1585. );
  1586.  
  1587.  
  1588. /***/ }),
  1589. /* 24 */
  1590. /***/ (function(module, exports, __webpack_require__) {
  1591.  
  1592. "use strict";
  1593.  
  1594.  
  1595. var utils = __webpack_require__(0);
  1596.  
  1597. module.exports = function normalizeHeaderName(headers, normalizedName) {
  1598. utils.forEach(headers, function processHeader(value, name) {
  1599. if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
  1600. headers[normalizedName] = value;
  1601. delete headers[name];
  1602. }
  1603. });
  1604. };
  1605.  
  1606.  
  1607. /***/ }),
  1608. /* 25 */
  1609. /***/ (function(module, exports, __webpack_require__) {
  1610.  
  1611. "use strict";
  1612.  
  1613.  
  1614. var utils = __webpack_require__(0);
  1615.  
  1616. /**
  1617. * Parse headers into an object
  1618. *
  1619. * ```
  1620. * Date: Wed, 27 Aug 2014 08:58:49 GMT
  1621. * Content-Type: application/json
  1622. * Connection: keep-alive
  1623. * Transfer-Encoding: chunked
  1624. * ```
  1625. *
  1626. * @param {String} headers Headers needing to be parsed
  1627. * @returns {Object} Headers parsed into an object
  1628. */
  1629. module.exports = function parseHeaders(headers) {
  1630. var parsed = {};
  1631. var key;
  1632. var val;
  1633. var i;
  1634.  
  1635. if (!headers) { return parsed; }
  1636.  
  1637. utils.forEach(headers.split('\n'), function parser(line) {
  1638. i = line.indexOf(':');
  1639. key = utils.trim(line.substr(0, i)).toLowerCase();
  1640. val = utils.trim(line.substr(i + 1));
  1641.  
  1642. if (key) {
  1643. parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
  1644. }
  1645. });
  1646.  
  1647. return parsed;
  1648. };
  1649.  
  1650.  
  1651. /***/ }),
  1652. /* 26 */
  1653. /***/ (function(module, exports, __webpack_require__) {
  1654.  
  1655. "use strict";
  1656.  
  1657.  
  1658. /**
  1659. * Syntactic sugar for invoking a function and expanding an array for arguments.
  1660. *
  1661. * Common use case would be to use `Function.prototype.apply`.
  1662. *
  1663. * ```js
  1664. * function f(x, y, z) {}
  1665. * var args = [1, 2, 3];
  1666. * f.apply(null, args);
  1667. * ```
  1668. *
  1669. * With `spread` this example can be re-written.
  1670. *
  1671. * ```js
  1672. * spread(function(x, y, z) {})([1, 2, 3]);
  1673. * ```
  1674. *
  1675. * @param {Function} callback
  1676. * @returns {Function}
  1677. */
  1678. module.exports = function spread(callback) {
  1679. return function wrap(arr) {
  1680. return callback.apply(null, arr);
  1681. };
  1682. };
  1683.  
  1684.  
  1685. /***/ }),
  1686. /* 27 */
  1687. /***/ (function(module, exports, __webpack_require__) {
  1688.  
  1689.  
  1690.  
  1691. /**
  1692. * We'll load jQuery and the Bootstrap jQuery plugin which provides support
  1693. * for JavaScript based Bootstrap features such as modals and tabs. This
  1694. * code may be modified to fit the specific needs of your application.
  1695. */
  1696.  
  1697. /**
  1698. * We'll load the axios HTTP library which allows us to easily issue requests
  1699. * to our Laravel back-end. This library automatically handles sending the
  1700. * CSRF token as a header based on the value of the "XSRF" token cookie.
  1701. */
  1702.  
  1703. window.axios = __webpack_require__(9);
  1704.  
  1705. window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
  1706.  
  1707. /**
  1708. * Next we will register the CSRF Token as a common header with Axios so that
  1709. * all outgoing HTTP requests automatically have it attached. This is just
  1710. * a simple convenience so we don't have to attach every token manually.
  1711. */
  1712.  
  1713. var token = document.head.querySelector('meta[name="csrf-token"]');
  1714.  
  1715. if (token) {
  1716. window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
  1717. } else {
  1718. console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
  1719. }
  1720.  
  1721. /**
  1722. * Echo exposes an expressive API for subscribing to channels and listening
  1723. * for events that are broadcast by Laravel. Echo and event broadcasting
  1724. * allows your team to easily build robust real-time web applications.
  1725. */
  1726.  
  1727. // import Echo from 'laravel-echo'
  1728.  
  1729. // window.Pusher = require('pusher-js');
  1730.  
  1731. // window.Echo = new Echo({
  1732. // broadcaster: 'pusher',
  1733. // key: 'your-pusher-key'
  1734. // });
  1735.  
  1736. /***/ }),
  1737. /* 28 */
  1738. /***/ (function(module, exports) {
  1739.  
  1740. // shim for using process in browser
  1741. var process = module.exports = {};
  1742.  
  1743. // cached from whatever global is present so that test runners that stub it
  1744. // don't break things. But we need to wrap it in a try catch in case it is
  1745. // wrapped in strict mode code which doesn't define any globals. It's inside a
  1746. // function because try/catches deoptimize in certain engines.
  1747.  
  1748. var cachedSetTimeout;
  1749. var cachedClearTimeout;
  1750.  
  1751. function defaultSetTimout() {
  1752. throw new Error('setTimeout has not been defined');
  1753. }
  1754. function defaultClearTimeout () {
  1755. throw new Error('clearTimeout has not been defined');
  1756. }
  1757. (function () {
  1758. try {
  1759. if (typeof setTimeout === 'function') {
  1760. cachedSetTimeout = setTimeout;
  1761. } else {
  1762. cachedSetTimeout = defaultSetTimout;
  1763. }
  1764. } catch (e) {
  1765. cachedSetTimeout = defaultSetTimout;
  1766. }
  1767. try {
  1768. if (typeof clearTimeout === 'function') {
  1769. cachedClearTimeout = clearTimeout;
  1770. } else {
  1771. cachedClearTimeout = defaultClearTimeout;
  1772. }
  1773. } catch (e) {
  1774. cachedClearTimeout = defaultClearTimeout;
  1775. }
  1776. } ())
  1777. function runTimeout(fun) {
  1778. if (cachedSetTimeout === setTimeout) {
  1779. //normal enviroments in sane situations
  1780. return setTimeout(fun, 0);
  1781. }
  1782. // if setTimeout wasn't available but was latter defined
  1783. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  1784. cachedSetTimeout = setTimeout;
  1785. return setTimeout(fun, 0);
  1786. }
  1787. try {
  1788. // when when somebody has screwed with setTimeout but no I.E. maddness
  1789. return cachedSetTimeout(fun, 0);
  1790. } catch(e){
  1791. try {
  1792. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  1793. return cachedSetTimeout.call(null, fun, 0);
  1794. } catch(e){
  1795. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  1796. return cachedSetTimeout.call(this, fun, 0);
  1797. }
  1798. }
  1799.  
  1800.  
  1801. }
  1802. function runClearTimeout(marker) {
  1803. if (cachedClearTimeout === clearTimeout) {
  1804. //normal enviroments in sane situations
  1805. return clearTimeout(marker);
  1806. }
  1807. // if clearTimeout wasn't available but was latter defined
  1808. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  1809. cachedClearTimeout = clearTimeout;
  1810. return clearTimeout(marker);
  1811. }
  1812. try {
  1813. // when when somebody has screwed with setTimeout but no I.E. maddness
  1814. return cachedClearTimeout(marker);
  1815. } catch (e){
  1816. try {
  1817. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  1818. return cachedClearTimeout.call(null, marker);
  1819. } catch (e){
  1820. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  1821. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  1822. return cachedClearTimeout.call(this, marker);
  1823. }
  1824. }
  1825.  
  1826.  
  1827.  
  1828. }
  1829. var queue = [];
  1830. var draining = false;
  1831. var currentQueue;
  1832. var queueIndex = -1;
  1833.  
  1834. function cleanUpNextTick() {
  1835. if (!draining || !currentQueue) {
  1836. return;
  1837. }
  1838. draining = false;
  1839. if (currentQueue.length) {
  1840. queue = currentQueue.concat(queue);
  1841. } else {
  1842. queueIndex = -1;
  1843. }
  1844. if (queue.length) {
  1845. drainQueue();
  1846. }
  1847. }
  1848.  
  1849. function drainQueue() {
  1850. if (draining) {
  1851. return;
  1852. }
  1853. var timeout = runTimeout(cleanUpNextTick);
  1854. draining = true;
  1855.  
  1856. var len = queue.length;
  1857. while(len) {
  1858. currentQueue = queue;
  1859. queue = [];
  1860. while (++queueIndex < len) {
  1861. if (currentQueue) {
  1862. currentQueue[queueIndex].run();
  1863. }
  1864. }
  1865. queueIndex = -1;
  1866. len = queue.length;
  1867. }
  1868. currentQueue = null;
  1869. draining = false;
  1870. runClearTimeout(timeout);
  1871. }
  1872.  
  1873. process.nextTick = function (fun) {
  1874. var args = new Array(arguments.length - 1);
  1875. if (arguments.length > 1) {
  1876. for (var i = 1; i < arguments.length; i++) {
  1877. args[i - 1] = arguments[i];
  1878. }
  1879. }
  1880. queue.push(new Item(fun, args));
  1881. if (queue.length === 1 && !draining) {
  1882. runTimeout(drainQueue);
  1883. }
  1884. };
  1885.  
  1886. // v8 likes predictible objects
  1887. function Item(fun, array) {
  1888. this.fun = fun;
  1889. this.array = array;
  1890. }
  1891. Item.prototype.run = function () {
  1892. this.fun.apply(null, this.array);
  1893. };
  1894. process.title = 'browser';
  1895. process.browser = true;
  1896. process.env = {};
  1897. process.argv = [];
  1898. process.version = ''; // empty string to avoid regexp issues
  1899. process.versions = {};
  1900.  
  1901. function noop() {}
  1902.  
  1903. process.on = noop;
  1904. process.addListener = noop;
  1905. process.once = noop;
  1906. process.off = noop;
  1907. process.removeListener = noop;
  1908. process.removeAllListeners = noop;
  1909. process.emit = noop;
  1910. process.prependListener = noop;
  1911. process.prependOnceListener = noop;
  1912.  
  1913. process.listeners = function (name) { return [] }
  1914.  
  1915. process.binding = function (name) {
  1916. throw new Error('process.binding is not supported');
  1917. };
  1918.  
  1919. process.cwd = function () { return '/' };
  1920. process.chdir = function (dir) {
  1921. throw new Error('process.chdir is not supported');
  1922. };
  1923. process.umask = function() { return 0; };
  1924.  
  1925.  
  1926. /***/ }),
  1927. /* 29 */
  1928. /***/ (function(module, exports, __webpack_require__) {
  1929.  
  1930. __webpack_require__(7);
  1931. module.exports = __webpack_require__(8);
  1932.  
  1933.  
  1934. /***/ })
  1935. /******/ ]);
Add Comment
Please, Sign In to add comment