/******/ (function(modules) { // webpackBootstrap /******/ // install a JSONP callback for chunk loading /******/ var parentJsonpFunction = window["webpackJsonp"]; /******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) { /******/ // add "moreModules" to the modules object, /******/ // then flag all "chunkIds" as loaded and fire callback /******/ var moduleId, chunkId, i = 0, resolves = [], result; /******/ for(;i < chunkIds.length; i++) { /******/ chunkId = chunkIds[i]; /******/ if(installedChunks[chunkId]) { /******/ resolves.push(installedChunks[chunkId][0]); /******/ } /******/ installedChunks[chunkId] = 0; /******/ } /******/ for(moduleId in moreModules) { /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { /******/ modules[moduleId] = moreModules[moduleId]; /******/ } /******/ } /******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules); /******/ while(resolves.length) { /******/ resolves.shift()(); /******/ } /******/ /******/ }; /******/ /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // objects to store loaded and loading chunks /******/ var installedChunks = { /******/ 283: 0 /******/ }; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ // This file contains only the entry chunk. /******/ // The chunk loading function for additional chunks /******/ __webpack_require__.e = function requireEnsure(chunkId) { /******/ var installedChunkData = installedChunks[chunkId]; /******/ if(installedChunkData === 0) { /******/ return new Promise(function(resolve) { resolve(); }); /******/ } /******/ /******/ // a Promise means "currently loading". /******/ if(installedChunkData) { /******/ return installedChunkData[2]; /******/ } /******/ /******/ // setup Promise in chunk cache /******/ var promise = new Promise(function(resolve, reject) { /******/ installedChunkData = installedChunks[chunkId] = [resolve, reject]; /******/ }); /******/ installedChunkData[2] = promise; /******/ /******/ // start chunk loading /******/ var head = document.getElementsByTagName('head')[0]; /******/ var script = document.createElement('script'); /******/ script.type = 'text/javascript'; /******/ script.charset = 'utf-8'; /******/ script.async = true; /******/ script.timeout = 120000; /******/ /******/ if (__webpack_require__.nc) { /******/ script.setAttribute("nonce", __webpack_require__.nc); /******/ } /******/ script.src = __webpack_require__.p + "./static/js/" + ({}[chunkId]||chunkId) + "." + {"0":"dacc2220","1":"9cf72b3b","2":"714b856c","3":"872344f3","4":"948a9c90","5":"99b18bfc","6":"04df9675","7":"aff33df2","8":"dddd4c61","9":"e9335b39","10":"1db812a1","11":"3acd0087","12":"dac67207","13":"372d14b5","14":"1c61e5c9","15":"56305174","16":"2de644a4","17":"c8ce3397","18":"e02d8e15","19":"5d5a3b43","20":"a8062e1c","21":"bddfe988","22":"b33c68fe","23":"5a2e9707","24":"0c3031c3","25":"24413743","26":"aa298283","27":"2c7ff251","28":"0220f58b","29":"5fa5b825","30":"c4fa564a","31":"bc98b78a","32":"2e8e09f9","33":"076176ee","34":"a65434e3","35":"a7fc2e34","36":"c10a153d","37":"d3bdbb5f","38":"010f78e5","39":"4376f272","40":"5c57a90a","41":"88848c6f","42":"be43f9dc","43":"4503f5a9","44":"8cbab79e","45":"92ec57ab","46":"a14757e3","47":"e0c840f4","48":"0a796345","49":"2dce406b","50":"40a9fae5","51":"c58c0784","52":"77c89a08","53":"977ddfee","54":"b63fc3f3","55":"1a7eb9d6","56":"e81609c9","57":"1dee2dec","58":"d91e943d","59":"423c3e11","60":"2512fc37","61":"94141d29","62":"b9c777b5","63":"d96d87cb","64":"127c318f","65":"8a467182","66":"2e34f7b3","67":"04e986c2","68":"4d9dee05","69":"bea6b79c","70":"59a5b99a","71":"228ec363","72":"0f2675f4","73":"551abec1","74":"03e7ffa4","75":"e5a7f153","76":"5e8a9278","77":"09b7a555","78":"2ca6256f","79":"1d358093","80":"c78e9f1d","81":"944dad0e","82":"0ddecf95","83":"f5655f4b","84":"83666af0","85":"2b694ad1","86":"10009f16","87":"de86e831","88":"595cb09d","89":"ef5e6985","90":"5adafc72","91":"1eafd1a9","92":"1c01e923","93":"3448d24e","94":"68962652","95":"7f801368","96":"eb4b55fe","97":"a4f796ff","98":"f63f8b2f","99":"20c292ba","100":"f1bc2a7b","101":"8dce6e7f","102":"1b9c5733","103":"96cbd560","104":"9963ad2e","105":"1eba90e3","106":"1b5b3d30","107":"cd80fc99","108":"ea1315c8","109":"6c7205b2","110":"4510bead","111":"861646d1","112":"fa01210e","113":"bbae6c53","114":"43a6af75","115":"7bbbfa68","116":"e8c402de","117":"87cfc640","118":"a5bb1a41","119":"bdf84216","120":"45d42839","121":"934178ca","122":"84598fd4","123":"e08c5628","124":"6efbade4","125":"f1265e17","126":"31955392","127":"2490049e","128":"9f53154c","129":"1833b0ab","130":"5feacaa1","131":"f24a5827","132":"7d629cd1","133":"32f62338","134":"a6be5f8a","135":"16cbd1cb","136":"745269b6","137":"3f917c0e","138":"c0157542","139":"aa5ef293","140":"37fc643b","141":"645c893b","142":"1e42f85b","143":"c6a85285","144":"8d86d443","145":"7579e24f","146":"93d5d02d","147":"810b04c4","148":"cf2763eb","149":"8b10e1db","150":"6ee35221","151":"5772314d","152":"3530d5e0","153":"aefe03e0","154":"8821c871","155":"86c89269","156":"a55cd589","157":"0756810d","158":"0860c509","159":"09de649c","160":"80cd9280","161":"a10830d5","162":"aa7d3cb2","163":"f20c9c4a","164":"2da0fdc2","165":"1b121093","166":"57b4933e","167":"6ec24443","168":"ef674622","169":"3f23df6d","170":"de42e97b","171":"78b481ff","172":"e39cc8a1","173":"1549fd57","174":"91ac22b3","175":"17b2c1ba","176":"b3f0933c","177":"3c4fa83e","178":"1be7f9e6","179":"749d573c","180":"9c58ccd5","181":"4480167b","182":"f5d43c9c","183":"5258d0af","184":"8c7442f9","185":"36a63b95","186":"eab6f0e9","187":"5b7c5824","188":"c65b6379","189":"3e2652ca","190":"36949d03","191":"9d44d5c9","192":"e1693dea","193":"2619dbc7","194":"ae17b65a","195":"51f67fed","196":"615ea830","197":"b3eb1c30","198":"c7683a5e","199":"2faa6693","200":"9e081ac5","201":"72e20bd9","202":"3ccf54f7","203":"9856bd86","204":"8d020827","205":"a1e6f477","206":"fad3b5ad","207":"6f920c94","208":"f6086870","209":"02aaeaf0","210":"412c2c8b","211":"37b8fcb7","212":"126db150","213":"2d5ea647","214":"6ac3e69e","215":"a4983f40","216":"444f281d","217":"d6bd4afe","218":"78d0ed46","219":"faa66960","220":"1f946316","221":"62bdf7e3","222":"c5065aea","223":"742598c7","224":"0a3c5cda","225":"30e2c482","226":"bf618fd2","227":"edf63b3f","228":"5371aa47","229":"cea57269","230":"fbb2d332","231":"c8e19a5c","232":"2c1caebe","233":"9becc7e5","234":"acc91689","235":"42a9faf6","236":"6768b3d9","237":"863baf46","238":"27bd87a6","239":"fb695bca","240":"5e3c1b60","241":"f845d662","242":"6b401083","243":"3c7235c0","244":"c77cf4f5","245":"2decb597","246":"2a37d0e3","247":"b63b9b48","248":"40866bc1","249":"04bf2c05","250":"35881f89","251":"f1f5e7d2","252":"072c40f8","253":"2fdb62bb","254":"db150feb","255":"9f80e7d6","256":"0b86058b","257":"c979bdfb","258":"c23785f4","259":"b16028a6","260":"9ec9f132","261":"5a41d904","262":"2ce44a70","263":"dace4a39","264":"776214d1","265":"5b9447e5","266":"b299deef","267":"56f49f83","268":"30ee64de","269":"8189ebc0","270":"d5907e8d","271":"26173459","272":"25a9a74d","273":"f51e48fd","274":"c57b6035","275":"98ec42af","276":"5a6f5fe3","277":"2561e854","278":"d6eba546","279":"7cbf8af3","280":"f0949587","281":"0dda560f","282":"b279f862"}[chunkId] + ".chunk.js"; /******/ var timeout = setTimeout(onScriptComplete, 120000); /******/ script.onerror = script.onload = onScriptComplete; /******/ function onScriptComplete() { /******/ // avoid mem leaks in IE. /******/ script.onerror = script.onload = null; /******/ clearTimeout(timeout); /******/ var chunk = installedChunks[chunkId]; /******/ if(chunk !== 0) { /******/ if(chunk) { /******/ chunk[1](new Error('Loading chunk ' + chunkId + ' failed.')); /******/ } /******/ installedChunks[chunkId] = undefined; /******/ } /******/ }; /******/ head.appendChild(script); /******/ /******/ return promise; /******/ }; /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "/react/build/"; /******/ /******/ // on error function for async loading /******/ __webpack_require__.oe = function(err) { console.error(err); throw err; }; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 401); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; if (true) { module.exports = __webpack_require__(408); } else { module.exports = require('./cjs/react.development.js'); } /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (false) { var ReactIs = require('react-is'); // By explicitly using `prop-types` you are opting into new development behavior. // http://fb.me/prop-types-in-prod var throwOnDirectAccess = true; module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess); } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = __webpack_require__(418)(); } /***/ }), /* 2 */ /***/ (function(module, exports) { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } module.exports = _interopRequireDefault; /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /* global define */ (function () { 'use strict'; var hasOwn = {}.hasOwnProperty; function classNames () { var classes = []; for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; if (!arg) continue; var argType = typeof arg; if (argType === 'string' || argType === 'number') { classes.push(arg); } else if (Array.isArray(arg) && arg.length) { var inner = classNames.apply(null, arg); if (inner) { classes.push(inner); } } else if (argType === 'object') { for (var key in arg) { if (hasOwn.call(arg, key) && arg[key]) { classes.push(key); } } } } return classes.join(' '); } if (typeof module !== 'undefined' && module.exports) { classNames.default = classNames; module.exports = classNames; } else if (true) { // register as 'classnames', consistent with npm package name !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () { return classNames; }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else { window.classNames = classNames; } }()); /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function checkDCE() { /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function' ) { return; } if (false) { // This branch is unreachable because this function is only called // in production, but the condition is true only in development. // Therefore if the branch is still here, dead code elimination wasn't // properly applied. // Don't change the message. React DevTools relies on it. Also make sure // this message doesn't occur elsewhere in this function, or it will cause // a false positive. throw new Error('^_^'); } try { // Verify that the code above has been dead code eliminated (DCE'd). __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE); } catch (err) { // DevTools shouldn't crash React, no matter what. // We should still report in case we break this code. console.error(err); } } if (true) { // DCE check should happen before ReactDOM bundle executes so that // DevTools can report bad minification during injection. checkDCE(); module.exports = __webpack_require__(409); } else { module.exports = require('./cjs/react-dom.development.js'); } /***/ }), /* 5 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__UrlTool__ = __webpack_require__(638); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return __WEBPACK_IMPORTED_MODULE_0__UrlTool__["b"]; }); /* unused harmony reexport getmyUrl */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return __WEBPACK_IMPORTED_MODULE_0__UrlTool__["c"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return __WEBPACK_IMPORTED_MODULE_0__UrlTool__["i"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_3", function() { return __WEBPACK_IMPORTED_MODULE_0__UrlTool__["l"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return __WEBPACK_IMPORTED_MODULE_0__UrlTool__["d"]; }); /* unused harmony reexport getUrlmys */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return __WEBPACK_IMPORTED_MODULE_0__UrlTool__["j"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_5", function() { return __WEBPACK_IMPORTED_MODULE_0__UrlTool__["m"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return __WEBPACK_IMPORTED_MODULE_0__UrlTool__["f"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return __WEBPACK_IMPORTED_MODULE_0__UrlTool__["h"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return __WEBPACK_IMPORTED_MODULE_0__UrlTool__["g"]; }); /* unused harmony reexport getUploadActionUrlOfAuth */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return __WEBPACK_IMPORTED_MODULE_0__UrlTool__["e"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return __WEBPACK_IMPORTED_MODULE_0__UrlTool__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "X", function() { return __WEBPACK_IMPORTED_MODULE_0__UrlTool__["k"]; }); /* unused harmony reexport getupload_git_file */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Component__ = __webpack_require__(656); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_6", function() { return __WEBPACK_IMPORTED_MODULE_1__Component__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__UrlTool2__ = __webpack_require__(657); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__UrlTool2___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__UrlTool2__); /* harmony reexport (default from non-hamory) */ __webpack_require__.d(__webpack_exports__, "_4", function() { return __WEBPACK_IMPORTED_MODULE_2__UrlTool2___default.a; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__SnackbarHOC__ = __webpack_require__(658); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return __WEBPACK_IMPORTED_MODULE_3__SnackbarHOC__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__EventUtil__ = __webpack_require__(661); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_10", function() { return __WEBPACK_IMPORTED_MODULE_4__EventUtil__["e"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_2", function() { return __WEBPACK_IMPORTED_MODULE_4__EventUtil__["d"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_1", function() { return __WEBPACK_IMPORTED_MODULE_4__EventUtil__["c"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return __WEBPACK_IMPORTED_MODULE_4__EventUtil__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return __WEBPACK_IMPORTED_MODULE_4__EventUtil__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__RouterUtil__ = __webpack_require__(662); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_11", function() { return __WEBPACK_IMPORTED_MODULE_5__RouterUtil__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__UnitUtil__ = __webpack_require__(663); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return __WEBPACK_IMPORTED_MODULE_6__UnitUtil__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__TextUtil__ = __webpack_require__(664); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_0", function() { return __WEBPACK_IMPORTED_MODULE_7__TextUtil__["e"]; }); /* unused harmony reexport uploadNameSizeSeperator */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return __WEBPACK_IMPORTED_MODULE_7__TextUtil__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return __WEBPACK_IMPORTED_MODULE_7__TextUtil__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return __WEBPACK_IMPORTED_MODULE_7__TextUtil__["d"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return __WEBPACK_IMPORTED_MODULE_7__TextUtil__["c"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_7", function() { return __WEBPACK_IMPORTED_MODULE_7__TextUtil__["f"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__DateUtil__ = __webpack_require__(665); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "W", function() { return __WEBPACK_IMPORTED_MODULE_8__DateUtil__["c"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return __WEBPACK_IMPORTED_MODULE_8__DateUtil__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return __WEBPACK_IMPORTED_MODULE_8__DateUtil__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__util_ShareUtil__ = __webpack_require__(666); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return __WEBPACK_IMPORTED_MODULE_9__util_ShareUtil__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return __WEBPACK_IMPORTED_MODULE_9__util_ShareUtil__["c"]; }); /* unused harmony reexport configShareForShixuns */ /* unused harmony reexport configShareForCourses */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return __WEBPACK_IMPORTED_MODULE_9__util_ShareUtil__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Env__ = __webpack_require__(667); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return __WEBPACK_IMPORTED_MODULE_10__Env__["a"]; }); /* unused harmony reexport isMobile */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__Store__ = __webpack_require__(668); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_8", function() { return __WEBPACK_IMPORTED_MODULE_11__Store__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return __WEBPACK_IMPORTED_MODULE_11__Store__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__LogUtil__ = __webpack_require__(680); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "_9", function() { return __WEBPACK_IMPORTED_MODULE_12__LogUtil__["a"]; }); /* unused harmony reexport trace */ /* unused harmony reexport debug */ /* unused harmony reexport info */ /* unused harmony reexport warn */ /* unused harmony reexport error */ /* unused harmony reexport trace_c */ /* unused harmony reexport debug_c */ /* unused harmony reexport info_c */ /* unused harmony reexport warn_c */ /* unused harmony reexport error_c */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__Const__ = __webpack_require__(682); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return __WEBPACK_IMPORTED_MODULE_13__Const__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return __WEBPACK_IMPORTED_MODULE_13__Const__["b"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return __WEBPACK_IMPORTED_MODULE_13__Const__["e"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return __WEBPACK_IMPORTED_MODULE_13__Const__["f"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return __WEBPACK_IMPORTED_MODULE_13__Const__["c"]; }); /* unused harmony reexport EDU_GAME_MANAGER */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return __WEBPACK_IMPORTED_MODULE_13__Const__["g"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return __WEBPACK_IMPORTED_MODULE_13__Const__["d"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__components_attachment_AttachmentList__ = __webpack_require__(371); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_14__components_attachment_AttachmentList__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_15__context_ThemeContext__ = __webpack_require__(683); /* unused harmony reexport themes */ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return __WEBPACK_IMPORTED_MODULE_15__context_ThemeContext__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_16__components_ModalHOC__ = __webpack_require__(684); /* unused harmony reexport ModalHOC */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_17__components_SetAppModel__ = __webpack_require__(699); /* unused harmony reexport SetAppModel */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_18__components_LinkAfterLogin__ = __webpack_require__(700); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return __WEBPACK_IMPORTED_MODULE_18__components_LinkAfterLogin__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_19__components_Cropper__ = __webpack_require__(701); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return __WEBPACK_IMPORTED_MODULE_19__components_Cropper__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_20__components_ConditionToolTip__ = __webpack_require__(702); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_20__components_ConditionToolTip__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_21__components_instruction_PopInstruction__ = __webpack_require__(725); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return __WEBPACK_IMPORTED_MODULE_21__components_instruction_PopInstruction__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_22__components_form_City__ = __webpack_require__(726); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_22__components_form_City__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_23__course_WordsBtn__ = __webpack_require__(734); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return __WEBPACK_IMPORTED_MODULE_23__course_WordsBtn__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_24__course_ActionBtn__ = __webpack_require__(735); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_24__course_ActionBtn__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_25__components_markdown_MarkdownToHtml__ = __webpack_require__(736); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return __WEBPACK_IMPORTED_MODULE_25__components_markdown_MarkdownToHtml__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_26__components_markdown_DMDEditor__ = __webpack_require__(738); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return __WEBPACK_IMPORTED_MODULE_26__components_markdown_DMDEditor__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_27__components_media_Clappr__ = __webpack_require__(769); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_27__components_media_Clappr__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_28__components_media_AliyunUploader__ = __webpack_require__(776); /* unused harmony reexport AliyunUploader */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_29__hooks_ImageLayer2__ = __webpack_require__(777); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return __WEBPACK_IMPORTED_MODULE_29__hooks_ImageLayer2__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_30__modules_courses_common_CBreadcrumb__ = __webpack_require__(353); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_30__modules_courses_common_CBreadcrumb__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_31__modules_courses_common_CNotificationHOC__ = __webpack_require__(354); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_31__modules_courses_common_CNotificationHOC__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_32__modules_courses_common_ModalWrapper__ = __webpack_require__(340); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return __WEBPACK_IMPORTED_MODULE_32__modules_courses_common_ModalWrapper__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_33__modules_courses_coursesPublic_NoneData__ = __webpack_require__(335); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return __WEBPACK_IMPORTED_MODULE_33__modules_courses_coursesPublic_NoneData__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_34__modules_modals_WordNumberTextarea__ = __webpack_require__(786); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return __WEBPACK_IMPORTED_MODULE_34__modules_modals_WordNumberTextarea__["a"]; }); //import { from } from '_array-flatten@2.1.2@array-flatten'; // export { default as OrderStateUtil } from '../routes/Order/components/OrderStateUtil'; // export { default as DragValidator } from './components/DragValidator' // course // 外部 /***/ }), /* 6 */ /***/ (function(module, exports, __webpack_require__) { var _Object$getOwnPropertySymbols = __webpack_require__(251); var _Object$keys = __webpack_require__(49); function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = _Object$keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } if (_Object$getOwnPropertySymbols) { var sourceSymbolKeys = _Object$getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } module.exports = _objectWithoutProperties; /***/ }), /* 7 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "polyfill", function() { return polyfill; }); /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ function componentWillMount() { // Call this.constructor.gDSFP to support sub-classes. var state = this.constructor.getDerivedStateFromProps(this.props, this.state); if (state !== null && state !== undefined) { this.setState(state); } } function componentWillReceiveProps(nextProps) { // Call this.constructor.gDSFP to support sub-classes. // Use the setState() updater to ensure state isn't stale in certain edge cases. function updater(prevState) { var state = this.constructor.getDerivedStateFromProps(nextProps, prevState); return state !== null && state !== undefined ? state : null; } // Binding "this" is important for shallow renderer support. this.setState(updater.bind(this)); } function componentWillUpdate(nextProps, nextState) { try { var prevProps = this.props; var prevState = this.state; this.props = nextProps; this.state = nextState; this.__reactInternalSnapshotFlag = true; this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate( prevProps, prevState ); } finally { this.props = prevProps; this.state = prevState; } } // React may warn about cWM/cWRP/cWU methods being deprecated. // Add a flag to suppress these warnings for this special case. componentWillMount.__suppressDeprecationWarning = true; componentWillReceiveProps.__suppressDeprecationWarning = true; componentWillUpdate.__suppressDeprecationWarning = true; function polyfill(Component) { var prototype = Component.prototype; if (!prototype || !prototype.isReactComponent) { throw new Error('Can only polyfill class components'); } if ( typeof Component.getDerivedStateFromProps !== 'function' && typeof prototype.getSnapshotBeforeUpdate !== 'function' ) { return Component; } // If new component APIs are defined, "unsafe" lifecycles won't be called. // Error if any of these lifecycles are present, // Because they would work differently between older and newer (16.3+) versions of React. var foundWillMountName = null; var foundWillReceivePropsName = null; var foundWillUpdateName = null; if (typeof prototype.componentWillMount === 'function') { foundWillMountName = 'componentWillMount'; } else if (typeof prototype.UNSAFE_componentWillMount === 'function') { foundWillMountName = 'UNSAFE_componentWillMount'; } if (typeof prototype.componentWillReceiveProps === 'function') { foundWillReceivePropsName = 'componentWillReceiveProps'; } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') { foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps'; } if (typeof prototype.componentWillUpdate === 'function') { foundWillUpdateName = 'componentWillUpdate'; } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') { foundWillUpdateName = 'UNSAFE_componentWillUpdate'; } if ( foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null ) { var componentName = Component.displayName || Component.name; var newApiName = typeof Component.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()'; throw Error( 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + componentName + ' uses ' + newApiName + ' but also contains the following legacy lifecycles:' + (foundWillMountName !== null ? '\n ' + foundWillMountName : '') + (foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '') + (foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '') + '\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-async-component-lifecycle-hooks' ); } // React <= 16.2 does not support static getDerivedStateFromProps. // As a workaround, use cWM and cWRP to invoke the new static lifecycle. // Newer versions of React will ignore these lifecycles if gDSFP exists. if (typeof Component.getDerivedStateFromProps === 'function') { prototype.componentWillMount = componentWillMount; prototype.componentWillReceiveProps = componentWillReceiveProps; } // React <= 16.2 does not support getSnapshotBeforeUpdate. // As a workaround, use cWU to invoke the new lifecycle. // Newer versions of React will ignore that lifecycle if gSBU exists. if (typeof prototype.getSnapshotBeforeUpdate === 'function') { if (typeof prototype.componentDidUpdate !== 'function') { throw new Error( 'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype' ); } prototype.componentWillUpdate = componentWillUpdate; var componentDidUpdate = prototype.componentDidUpdate; prototype.componentDidUpdate = function componentDidUpdatePolyfill( prevProps, prevState, maybeSnapshot ) { // 16.3+ will not execute our will-update method; // It will pass a snapshot value to did-update though. // Older versions will require our polyfilled will-update value. // We need to handle both cases, but can't just check for the presence of "maybeSnapshot", // Because for <= 15.x versions this might be a "prevContext" object. // We also can't just check "__reactInternalSnapshot", // Because get-snapshot might return a falsy value. // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior. var snapshot = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : maybeSnapshot; componentDidUpdate.call(this, prevProps, prevState, snapshot); }; } return Component; } /***/ }), /* 8 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(452); /***/ }), /* 9 */ /***/ (function(module, exports, __webpack_require__) { var _Object$assign = __webpack_require__(511); function _extends() { module.exports = _extends = _Object$assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } module.exports = _extends; /***/ }), /* 10 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* * @Description: action类型 * @Author: tangjiang * @Date: 2019-11-13 20:05:39 * @Last Modified by: tangjiang * @Last Modified time: 2019-11-14 09:29:45 */var types={ADD_TODO:'ADD_TODO',GET_OJ_LIST:'GET_OJ_LIST',// JC 列表 SAVE_OJ_FORM_ID:'SAVE_OJ_FORM_ID',// 保存OJ form表单信息 GET_OJ_BY_ID:'GET_OJ_BY_ID',// 根据 id 号获取ojList中的数据 SAVE_OJ_FORM_CODE:'SAVE_OJ_FORM_CODE',// 代码 VALIDATE_OJ_FORM:'VALIDATE_OJ_FORM',// 验证表单 VALIDATE_OJ_NAME:'VALIDATE_OJ_NAME',// 任务名称 VALIDATE_OJ_LANGUAGE:'VALIDATE_OJ_LANGUAGE',// 编程语言 VALIDATE_OJ_DESCRIPTION:'VALIDATE_OJ_DESCRIPTION',// 描述 VALIDATE_OJ_DIFFICULT:'VALIDATE_OJ_DIFFICULT',// 难易度 VALIDATE_OJ_TIMELIMIT:'VALIDATE_OJ_TIMELIMIT',// 时间限制 VALIDATE_OJ_CATEGORY:'VALIDATE_OJ_CATEGORY',// 分类 VALIDATE_OJ_SUB_DISCIPLINE_ID:'VALIDATE_OJ_SUB_DISCIPLINE_ID',// 方向 VALIDATE_OJ_OPENORNOT:'VALIDATE_OJ_OPENORNOT',// 公开程序 SAVE_TAG_DISCIPLINE_ID:'SAVE_TAG_DISCIPLINE_ID',// 保存知识点 SAVE_OJ_FORM:'SAVE_OJ_FORM',// 保存表单 ADD_TEST_CASE:'ADD_TEST_CASE',// 添加测试用例 DELETE_TEST_CASE:'DELETE_TEST_CASE',// 删除测试用例 SAVE_TEST_CASE:'SAVE_TEST_CASE',// 保存测试用例 SAVE_USE_TEST_CASE_VALUE:'SAVE_USE_TEST_CASE_VALUE',// 用户自定义测试用例值 CHANGE_PUBLISH_VALUE:'CHANGE_PUBLISH_VALUE',// 改变发布状态值 CLEAR_JSFORM_STORE:'CLEAR_JSFORM_STORE',// 清空测试用例 SAVE_EDIT_OJ_FORM_AND_TEST_CASE:'SAVE_EDIT_OJ_FORM_AND_TEST_CASE',// 保存根据id获取的表单及测试用例值 TEST_CODE_STATUS:'TEST_CODE_STATUS',// 代码调试状态 VALIDATE_TEST_CODE_ARRS:'VALIDATE_TEST_CODE_ARRS',// 更改测试用例验证结果 TEST_CASE_INPUT_CHANGE:'TEST_CASE_INPUT_CHANGE',// 测试用例输入值改变时 TEST_CASE_OUTPUT_CHANGE:'TEST_CASE_OUTPUT_CHANGE',// 测试用例输出值改变时 DEBUGGER_CODE:'DEBUGGER_CODE',// 调试代码 GET_COURSE_QUESTION:'GET_COURSE_QUESTION',// 获取编辑题 CHANGE_KNOWLEDGES:'CHANGE_KNOWLEDGES',// 保存所选择的知识点 SET_OJ_INITIAL_VALUE:'SET_OJ_INITIAL_VALUE',// 设置初始值 // study SAVE_USER_PROGRAM_ID:'SAVE_USER_PROGRAM_ID',// 保存用户编程题id值 USER_PROGRAM_DETAIL:'USER_PROGRAM_DETAIL',// 用户编程题详情 SHOW_OR_HIDE_CONTROL:'SHOW_OR_HIDE_CONTROL',// 显示或隐藏控制台 LOADING_STATUS:'LOADING_STATUS',// loading状态 COMMIT_RECORD_DETAIL:'COMMIT_RECORD_DETAIL',// 提交记录详情 COMMIT_RECORD:'COMMIT_RECORD',// 提交记录 SAVE_USER_CODE:'SAVE_USER_CODE',// 用户编辑的代码块 IS_UPDATE_CODE:'IS_UPDATE_CODE',// 是否更新代码块内容 CHANGE_USER_CODE_TAB:'CHANGE_USER_CODE_TAB',// 切换学员测评tab SUBMIT_LOADING_STATUS:'SUBMIT_LOADING_STATUS',// 提交按钮状态值 PUBLISH_LOADING_STATUS:'PUBLISH_LOADING_STATUS',// 发布按钮 IS_MY_SOURCE:'IS_MY_SOURCE',CHANGE_PAGINATION_INFO:'CHANGE_PAGINATION_INFO',// 改变分页数据 UPDATE_TEST_AND_VALIDATE:'UPDATE_TEST_AND_VALIDATE',// 更新测试用例及验证值 UPDATE_OPEN_TESTCASE_INDEX:'UPDATE_OPEN_TESTCASE_INDEX',// 更新测试用例索引 GET_COMMIT_RECORD_DETAIL_BY_ID:'GET_COMMIT_RECORD_DETAIL_BY_ID',// 根据id号获取提交记录详情 RESTORE_INITIAL_CODE:'RESTORE_INITIAL_CODE',// 恢复初始代码 SAVE_USER_INFO:'SAVE_USER_INFO',// 只在用户信息 SAVE_HACK_IDENTIFIER:'SAVE_HACK_IDENTIFIER',// 用户界面跑到编辑界面需要用的id值 SAVE_EDITOR_CODE:'SAVE_EDITOR_CODE',// 保存详情页面中编辑时的代码 CLICK_OPERATE_TYPE:'CLICK_OPERATE_TYPE',// 点击类型 CLEAR_OJ_FOR_USER_REDUCER:'CLEAR_OJ_FOR_USER_REDUCER',// 退出时清空 ojForUserReducer保存内容 ADD_OJ_LIKE_COUNT:'ADD_OJ_LIKE_COUNT',// 增加点赞数 CHANGE_RECORD_PAGINATION_PAGE:'CHANGE_RECORD_PAGINATION_PAGE',// 改变提交分页 UPDATE_OJ_FOR_USER_COMMENT_COUNT:'UPDATE_OJ_FOR_USER_COMMENT_COUNT',// 更新 hack 中的评论数, UPDATE_NOTE_CONTENT:'UPDATE_NOTE_CONTENT',// 更新笔记内容 UPDATE_HACK_PASSED:'UPDATE_HACK_PASSED',/*** jupyter */GET_JUPYTER_DATA_SETS:'GET_JUPYTER_DATA_SETS',// jupyter 数据集 GET_JUPYTER_TPI_URL:'GET_JUPYTER_TPI_URL',// 获取 jupyter url SAVE_JUPYTER_IDENTIFIER:'SAVE_JUPYTER_IDENTIFIER',// 保存jupyter identifier SAVE_JUPYTER_INFO:'SAVE_JUPYTER_INFO',// 保存 jupyter 信息 CHANGE_JUPYTER_URL_STATE:'CHANGE_JUPYTER_URL_STATE',// 获取url返回的状态值 SAVE_JUPYTER_TPI:'SAVE_JUPYTER_TPI',// 保存 jupyter tpi CHANGE_JUPYTER_CURRENT_PAGE:'CHANGE_JUPYTER_CURRENT_PAGE',SAVE_NOTICE_COUNT:'SAVE_NOTICE_COUNT',// 保存代码块是否更新 AUTO_UPDATE_CODE:'AUTO_UPDATE_CODE',// 自动更新代码 CHANGE_SHOW_DRAWER:'CHANGE_SHOW_DRAWER',CHANGE_JYPYTER_TIME:'CHANGE_JYPYTER_TIME',//增加15分钟 CHANGE_EXTENDED_TIME:'CHANGE_EXTENDED_TIME',//延时 CHANGE_UPDETA_SPIN:'CHANGE_UPDETA_SPIN',//加载 /*** 评论 */ADD_COMMENTS:'ADD_COMMENTS',// 添加评论 GET_COMMENT_LISTS:'GET_COMMENT_LISTS',// 获取评论列表 REPLAY_CHILD_COMMENTS:'REPLAY_CHILD_COMMENTS',// 子回复 DELETE_COMMENTS:'DELETE_COMMENTS',// 删除评论 SAVE_COMMENT_IDENTIFIER:'SAVE_COMMENT_IDENTIFIER',// 评论时的identifier CHANGE_COMMENT_PAGINATION_PARAMS:'CHANGE_COMMENT_PAGINATION_PARAMS',// 改变分页 /** tpi */SHOW_OR_HIDE_TPI_TEST_CASE:'SHOW_OR_HIDE_TPI_TEST_CASE',// 显示或隐藏tpi测试集弹框 IS_COLLAPSE_TEST_CASE:'IS_COLLAPSE_TEST_CASE',// 是否展开测试集 /** 统计 */GET_STATIC_INFO:'GET_STATIC_INFO',CHANGE_STATIC_PARAMS:'CHANGE_STATIC_PARAMS',CHANGE_STATIC_TOTAL:'CHANGE_STATIC_TOTAL',/** 微信 */GET_WXCODE_BY_IDENTIFIER:'GET_WXCODE_BY_IDENTIFIER',GET_WXCODE_TEST_CASE:'GET_WXCODE_TEST_CASE',UPDATE_WXCODE_BY_IDENTIFIER:'UPDATE_WXCODE_BY_IDENTIFIER',UPDATE_WXCODE_FOR_EDITOR:'UPDATE_WXCODE_FOR_EDITOR',IS_SHOW_WXCODE_TEST_CASES:'IS_SHOW_WXCODE_TEST_CASES',SHOW_WX_CODE_LOADING:'SHOW_WX_CODE_LOADING',SHOW_WX_CODE_DIALOG:'SHOW_WX_CODE_DIALOG',SET_GOLD_AND_EXPERIENCE:'SET_GOLD_AND_EXPERIENCE'};/* harmony default export */ __webpack_exports__["a"] = (types); /***/ }), /* 11 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; /***/ }), /* 12 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _typeof2 = __webpack_require__(122); var _typeof3 = _interopRequireDefault(_typeof2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; }; /***/ }), /* 13 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _setPrototypeOf = __webpack_require__(492); var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); var _create = __webpack_require__(495); var _create2 = _interopRequireDefault(_create); var _typeof2 = __webpack_require__(122); var _typeof3 = _interopRequireDefault(_typeof2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); } subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; }; /***/ }), /* 14 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "ConfigConsumer", { enumerable: true, get: function get() { return _context.ConfigConsumer; } }); exports["default"] = exports.configConsumerProps = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _localeProvider = _interopRequireWildcard(__webpack_require__(417)); var _LocaleReceiver = _interopRequireDefault(__webpack_require__(72)); var _context = __webpack_require__(358); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var configConsumerProps = ['getPopupContainer', 'rootPrefixCls', 'getPrefixCls', 'renderEmpty', 'csp', 'autoInsertSpaceInButton', 'locale', 'pageHeader']; exports.configConsumerProps = configConsumerProps; var ConfigProvider = /*#__PURE__*/ function (_React$Component) { _inherits(ConfigProvider, _React$Component); function ConfigProvider() { var _this; _classCallCheck(this, ConfigProvider); _this = _possibleConstructorReturn(this, _getPrototypeOf(ConfigProvider).apply(this, arguments)); _this.getPrefixCls = function (suffixCls, customizePrefixCls) { var _this$props$prefixCls = _this.props.prefixCls, prefixCls = _this$props$prefixCls === void 0 ? 'ant' : _this$props$prefixCls; if (customizePrefixCls) return customizePrefixCls; return suffixCls ? "".concat(prefixCls, "-").concat(suffixCls) : prefixCls; }; _this.renderProvider = function (context, legacyLocale) { var _this$props = _this.props, children = _this$props.children, getPopupContainer = _this$props.getPopupContainer, renderEmpty = _this$props.renderEmpty, csp = _this$props.csp, autoInsertSpaceInButton = _this$props.autoInsertSpaceInButton, locale = _this$props.locale, pageHeader = _this$props.pageHeader; var config = _extends(_extends({}, context), { getPrefixCls: _this.getPrefixCls, csp: csp, autoInsertSpaceInButton: autoInsertSpaceInButton }); if (getPopupContainer) { config.getPopupContainer = getPopupContainer; } if (renderEmpty) { config.renderEmpty = renderEmpty; } if (pageHeader) { config.pageHeader = pageHeader; } return React.createElement(_context.ConfigContext.Provider, { value: config }, React.createElement(_localeProvider["default"], { locale: locale || legacyLocale, _ANT_MARK__: _localeProvider.ANT_MARK }, children)); }; return _this; } _createClass(ConfigProvider, [{ key: "render", value: function render() { var _this2 = this; return React.createElement(_LocaleReceiver["default"], null, function (_, __, legacyLocale) { return React.createElement(_context.ConfigConsumer, null, function (context) { return _this2.renderProvider(context, legacyLocale); }); }); } }]); return ConfigProvider; }(React.Component); var _default = ConfigProvider; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 15 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var warning = function() {}; if (false) { warning = function(condition, format, args) { var len = arguments.length; args = new Array(len > 2 ? len - 2 : 0); for (var key = 2; key < len; key++) { args[key - 2] = arguments[key]; } if (format === undefined) { throw new Error( '`warning(condition, format, ...args)` requires a warning ' + 'message argument' ); } if (format.length < 10 || (/^[s\W]*$/).test(format)) { throw new Error( 'The warning format should be able to uniquely identify this ' + 'warning. Please, use a more descriptive format than: ' + format ); } if (!condition) { var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function() { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch(x) {} } }; } module.exports = warning; /***/ }), /* 16 */ /***/ (function(module, exports) { var core = module.exports = { version: '2.6.5' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef /***/ }), /* 17 */ /***/ (function(module, exports) { function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } module.exports = _classCallCheck; /***/ }), /* 18 */ /***/ (function(module, exports, __webpack_require__) { var _Object$defineProperty = __webpack_require__(151); function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; _Object$defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } module.exports = _createClass; /***/ }), /* 19 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _assign = __webpack_require__(475); var _assign2 = _interopRequireDefault(_assign); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = _assign2.default || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /***/ }), /* 20 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireWildcard = __webpack_require__(119); var _interopRequireDefault = __webpack_require__(2); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.sheetsManager = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(9)); var _keys = _interopRequireDefault(__webpack_require__(49)); var _objectSpread2 = _interopRequireDefault(__webpack_require__(26)); var _getPrototypeOf = _interopRequireDefault(__webpack_require__(22)); var _classCallCheck2 = _interopRequireDefault(__webpack_require__(17)); var _createClass2 = _interopRequireDefault(__webpack_require__(18)); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(23)); var _inherits2 = _interopRequireDefault(__webpack_require__(24)); var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(25)); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(6)); var _map = _interopRequireDefault(__webpack_require__(523)); var _minSafeInteger = _interopRequireDefault(__webpack_require__(539)); var _react = _interopRequireDefault(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(1)); var _warning = _interopRequireDefault(__webpack_require__(15)); var _hoistNonReactStatics = _interopRequireDefault(__webpack_require__(154)); var _getDisplayName = _interopRequireDefault(__webpack_require__(258)); var _wrapDisplayName = _interopRequireDefault(__webpack_require__(124)); var _contextTypes = _interopRequireDefault(__webpack_require__(542)); var _jss = __webpack_require__(260); var ns = _interopRequireWildcard(__webpack_require__(259)); var _jssPreset = _interopRequireDefault(__webpack_require__(266)); var _createMuiTheme = _interopRequireDefault(__webpack_require__(158)); var _themeListener = _interopRequireDefault(__webpack_require__(159)); var _createGenerateClassName = _interopRequireDefault(__webpack_require__(268)); var _getStylesCreator = _interopRequireDefault(__webpack_require__(583)); var _getThemeProps = _interopRequireDefault(__webpack_require__(584)); // Default JSS instance. var jss = (0, _jss.create)((0, _jssPreset.default)()); // Use a singleton or the provided one by the context. var generateClassName = (0, _createGenerateClassName.default)(); // Global index counter to preserve source order. // We create the style sheet during at the creation of the component, // children are handled after the parents, so the order of style elements would be parent->child. // It is a problem though when a parent passes a className // which needs to override any childs styles. // StyleSheet of the child has a higher specificity, because of the source order. // So our solution is to render sheets them in the reverse order child->sheet, so // that parent has a higher specificity. var indexCounter = _minSafeInteger.default; var sheetsManager = new _map.default(); // We use the same empty object to ref count the styles that don't need a theme object. exports.sheetsManager = sheetsManager; var noopTheme = {}; // In order to have self-supporting components, we rely on default theme when not provided. var defaultTheme; function getDefaultTheme() { if (defaultTheme) { return defaultTheme; } defaultTheme = (0, _createMuiTheme.default)(); return defaultTheme; } // Link a style sheet with a component. // It does not modify the component passed to it; // instead, it returns a new component, with a `classes` property. var withStyles = function withStyles(stylesOrCreator) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; return function (Component) { var _options$withTheme = options.withTheme, withTheme = _options$withTheme === void 0 ? false : _options$withTheme, _options$flip = options.flip, flip = _options$flip === void 0 ? null : _options$flip, name = options.name, styleSheetOptions = (0, _objectWithoutProperties2.default)(options, ["withTheme", "flip", "name"]); var stylesCreator = (0, _getStylesCreator.default)(stylesOrCreator); var listenToTheme = stylesCreator.themingEnabled || withTheme || typeof name === 'string'; indexCounter += 1; stylesCreator.options.index = indexCounter; false ? (0, _warning.default)(indexCounter < 0, ['Material-UI: you might have a memory leak.', 'The indexCounter is not supposed to grow that much.'].join(' ')) : void 0; var WithStyles = /*#__PURE__*/ function (_React$Component) { (0, _inherits2.default)(WithStyles, _React$Component); function WithStyles(props, context) { var _this; (0, _classCallCheck2.default)(this, WithStyles); _this = (0, _possibleConstructorReturn2.default)(this, (WithStyles.__proto__ || (0, _getPrototypeOf.default)(WithStyles)).call(this, props, context)); Object.defineProperty((0, _assertThisInitialized2.default)(_this), "state", { configurable: true, enumerable: true, writable: true, value: {} }); Object.defineProperty((0, _assertThisInitialized2.default)(_this), "disableStylesGeneration", { configurable: true, enumerable: true, writable: true, value: false }); Object.defineProperty((0, _assertThisInitialized2.default)(_this), "jss", { configurable: true, enumerable: true, writable: true, value: null }); Object.defineProperty((0, _assertThisInitialized2.default)(_this), "sheetOptions", { configurable: true, enumerable: true, writable: true, value: null }); Object.defineProperty((0, _assertThisInitialized2.default)(_this), "sheetsManager", { configurable: true, enumerable: true, writable: true, value: sheetsManager }); Object.defineProperty((0, _assertThisInitialized2.default)(_this), "stylesCreatorSaved", { configurable: true, enumerable: true, writable: true, value: null }); Object.defineProperty((0, _assertThisInitialized2.default)(_this), "theme", { configurable: true, enumerable: true, writable: true, value: null }); Object.defineProperty((0, _assertThisInitialized2.default)(_this), "unsubscribeId", { configurable: true, enumerable: true, writable: true, value: null }); _this.jss = _this.context[ns.jss] || jss; var muiThemeProviderOptions = _this.context.muiThemeProviderOptions; if (muiThemeProviderOptions) { if (muiThemeProviderOptions.sheetsManager) { _this.sheetsManager = muiThemeProviderOptions.sheetsManager; } _this.disableStylesGeneration = muiThemeProviderOptions.disableStylesGeneration; } // Attach the stylesCreator to the instance of the component as in the context // of react-hot-loader the hooks can be executed in a different closure context: // https://github.com/gaearon/react-hot-loader/blob/master/src/patch.dev.js#L107 _this.stylesCreatorSaved = stylesCreator; _this.sheetOptions = (0, _objectSpread2.default)({ generateClassName: generateClassName }, _this.context[ns.sheetOptions]); // We use || as the function call is lazy evaluated. _this.theme = listenToTheme ? _themeListener.default.initial(context) || getDefaultTheme() : noopTheme; _this.attach(_this.theme); _this.cacheClasses = { // Cache for the finalized classes value. value: null, // Cache for the last used classes prop pointer. lastProp: null, // Cache for the last used rendered classes pointer. lastJSS: {} }; return _this; } (0, _createClass2.default)(WithStyles, [{ key: "componentDidMount", value: function componentDidMount() { var _this2 = this; if (!listenToTheme) { return; } this.unsubscribeId = _themeListener.default.subscribe(this.context, function (theme) { var oldTheme = _this2.theme; _this2.theme = theme; _this2.attach(_this2.theme); // Rerender the component so the underlying component gets the theme update. // By theme update we mean receiving and applying the new class names. _this2.setState({}, function () { _this2.detach(oldTheme); }); }); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { // react-hot-loader specific logic if (this.stylesCreatorSaved === stylesCreator || "production" === 'production') { return; } this.detach(this.theme); this.stylesCreatorSaved = stylesCreator; this.attach(this.theme); this.forceUpdate(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.detach(this.theme); if (this.unsubscribeId !== null) { _themeListener.default.unsubscribe(this.context, this.unsubscribeId); } } }, { key: "getClasses", value: function getClasses() { var _this3 = this; // Tracks if either the rendered classes or classes prop has changed, // requiring the generation of a new finalized classes object. var generate = false; if (!this.disableStylesGeneration) { var sheetManager = this.sheetsManager.get(this.stylesCreatorSaved); var sheetsManagerTheme = sheetManager.get(this.theme); if (sheetsManagerTheme.sheet.classes !== this.cacheClasses.lastJSS) { this.cacheClasses.lastJSS = sheetsManagerTheme.sheet.classes; generate = true; } } if (this.props.classes !== this.cacheClasses.lastProp) { this.cacheClasses.lastProp = this.props.classes; generate = true; } if (generate) { if (this.props.classes) { this.cacheClasses.value = (0, _objectSpread2.default)({}, this.cacheClasses.lastJSS, (0, _keys.default)(this.props.classes).reduce(function (accumulator, key) { false ? (0, _warning.default)(_this3.cacheClasses.lastJSS[key] || _this3.disableStylesGeneration, ["Material-UI: the key `".concat(key, "` ") + "provided to the classes property is not implemented in ".concat((0, _getDisplayName.default)(Component), "."), "You can only override one of the following: ".concat((0, _keys.default)(_this3.cacheClasses.lastJSS).join(','))].join('\n')) : void 0; false ? (0, _warning.default)(!_this3.props.classes[key] || typeof _this3.props.classes[key] === 'string', ["Material-UI: the key `".concat(key, "` ") + "provided to the classes property is not valid for ".concat((0, _getDisplayName.default)(Component), "."), "You need to provide a non empty string instead of: ".concat(_this3.props.classes[key], ".")].join('\n')) : void 0; if (_this3.props.classes[key]) { accumulator[key] = "".concat(_this3.cacheClasses.lastJSS[key], " ").concat(_this3.props.classes[key]); } return accumulator; }, {})); } else { this.cacheClasses.value = this.cacheClasses.lastJSS; } } return this.cacheClasses.value; } }, { key: "attach", value: function attach(theme) { if (this.disableStylesGeneration) { return; } var stylesCreatorSaved = this.stylesCreatorSaved; var sheetManager = this.sheetsManager.get(stylesCreatorSaved); if (!sheetManager) { sheetManager = new _map.default(); this.sheetsManager.set(stylesCreatorSaved, sheetManager); } var sheetManagerTheme = sheetManager.get(theme); if (!sheetManagerTheme) { sheetManagerTheme = { refs: 0, sheet: null }; sheetManager.set(theme, sheetManagerTheme); } if (sheetManagerTheme.refs === 0) { var styles = stylesCreatorSaved.create(theme, name); var meta = name; if (false) { meta = (0, _getDisplayName.default)(Component); } var sheet = this.jss.createStyleSheet(styles, (0, _objectSpread2.default)({ meta: meta, classNamePrefix: meta, flip: typeof flip === 'boolean' ? flip : theme.direction === 'rtl', link: false }, this.sheetOptions, stylesCreatorSaved.options, { name: name }, styleSheetOptions)); sheetManagerTheme.sheet = sheet; sheet.attach(); var sheetsRegistry = this.context[ns.sheetsRegistry]; if (sheetsRegistry) { sheetsRegistry.add(sheet); } } sheetManagerTheme.refs += 1; } }, { key: "detach", value: function detach(theme) { if (this.disableStylesGeneration) { return; } var stylesCreatorSaved = this.stylesCreatorSaved; var sheetManager = this.sheetsManager.get(stylesCreatorSaved); var sheetManagerTheme = sheetManager.get(theme); sheetManagerTheme.refs -= 1; if (sheetManagerTheme.refs === 0) { sheetManager.delete(theme); this.jss.removeStyleSheet(sheetManagerTheme.sheet); var sheetsRegistry = this.context[ns.sheetsRegistry]; if (sheetsRegistry) { sheetsRegistry.remove(sheetManagerTheme.sheet); } } } }, { key: "render", value: function render() { var _props = this.props, classes = _props.classes, innerRef = _props.innerRef, other = (0, _objectWithoutProperties2.default)(_props, ["classes", "innerRef"]); var more = (0, _getThemeProps.default)({ theme: this.theme, name: name }); // Provide the theme to the wrapped component. // So we don't have to use the `withTheme()` Higher-order Component. if (withTheme) { more.theme = this.theme; } return _react.default.createElement(Component, (0, _extends2.default)({}, more, { classes: this.getClasses(), ref: innerRef }, other)); } }]); return WithStyles; }(_react.default.Component); WithStyles.propTypes = false ? { /** * Useful to extend the style applied to components. */ classes: _propTypes.default.object, /** * Use that property to pass a ref callback to the decorated component. */ innerRef: _propTypes.default.func } : {}; WithStyles.contextTypes = (0, _objectSpread2.default)({ muiThemeProviderOptions: _propTypes.default.object }, _contextTypes.default, listenToTheme ? _themeListener.default.contextTypes : {}); if (false) { WithStyles.displayName = (0, _wrapDisplayName.default)(Component, 'WithStyles'); } (0, _hoistNonReactStatics.default)(WithStyles, Component); if (false) { // Exposed for test purposes. WithStyles.Naked = Component; WithStyles.options = options; } return WithStyles; }; }; var _default = withStyles; exports.default = _default; /***/ }), /* 21 */ /***/ (function(module, exports, __webpack_require__) { var _Object$defineProperty = __webpack_require__(151); function _defineProperty(obj, key, value) { if (key in obj) { _Object$defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } module.exports = _defineProperty; /***/ }), /* 22 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(516); /***/ }), /* 23 */ /***/ (function(module, exports, __webpack_require__) { var _typeof = __webpack_require__(252); var assertThisInitialized = __webpack_require__(25); function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return assertThisInitialized(self); } module.exports = _possibleConstructorReturn; /***/ }), /* 24 */ /***/ (function(module, exports, __webpack_require__) { var _Object$create = __webpack_require__(520); var setPrototypeOf = __webpack_require__(521); function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = _Object$create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) setPrototypeOf(subClass, superClass); } module.exports = _inherits; /***/ }), /* 25 */ /***/ (function(module, exports) { function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } module.exports = _assertThisInitialized; /***/ }), /* 26 */ /***/ (function(module, exports, __webpack_require__) { var _Object$getOwnPropertyDescriptor = __webpack_require__(250); var _Object$getOwnPropertySymbols = __webpack_require__(251); var _Object$keys = __webpack_require__(49); var defineProperty = __webpack_require__(21); function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = _Object$keys(source); if (typeof _Object$getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(_Object$getOwnPropertySymbols(source).filter(function (sym) { return _Object$getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { defineProperty(target, key, source[key]); }); } return target; } module.exports = _objectSpread; /***/ }), /* 27 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _classnames = _interopRequireDefault(__webpack_require__(3)); var allIcons = _interopRequireWildcard(__webpack_require__(502)); var _iconsReact = _interopRequireDefault(__webpack_require__(249)); var _IconFont = _interopRequireDefault(__webpack_require__(507)); var _utils = __webpack_require__(508); var _warning = _interopRequireDefault(__webpack_require__(43)); var _LocaleReceiver = _interopRequireDefault(__webpack_require__(72)); var _twoTonePrimaryColor = __webpack_require__(509); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } var __rest = void 0 && (void 0).__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; /* eslint-disable camelcase */ // Initial setting _iconsReact["default"].add.apply(_iconsReact["default"], _toConsumableArray(Object.keys(allIcons).map(function (key) { return allIcons[key]; }))); (0, _twoTonePrimaryColor.setTwoToneColor)('#1890ff'); var defaultTheme = 'outlined'; var dangerousTheme; function unstable_ChangeThemeOfIconsDangerously(theme) { (0, _warning["default"])(false, 'Icon', "You are using the unstable method 'Icon.unstable_ChangeThemeOfAllIconsDangerously', " + "make sure that all the icons with theme '".concat(theme, "' display correctly.")); dangerousTheme = theme; } function unstable_ChangeDefaultThemeOfIcons(theme) { (0, _warning["default"])(false, 'Icon', "You are using the unstable method 'Icon.unstable_ChangeDefaultThemeOfIcons', " + "make sure that all the icons with theme '".concat(theme, "' display correctly.")); defaultTheme = theme; } var Icon = function Icon(props) { var _classNames; var className = props.className, type = props.type, Component = props.component, viewBox = props.viewBox, spin = props.spin, rotate = props.rotate, tabIndex = props.tabIndex, onClick = props.onClick, children = props.children, theme = props.theme, twoToneColor = props.twoToneColor, restProps = __rest(props, ["className", "type", "component", "viewBox", "spin", "rotate", "tabIndex", "onClick", "children", "theme", "twoToneColor"]); (0, _warning["default"])(Boolean(type || Component || children), 'Icon', 'Should have `type` prop or `component` prop or `children`.'); var classString = (0, _classnames["default"])((_classNames = {}, _defineProperty(_classNames, "anticon", true), _defineProperty(_classNames, "anticon-".concat(type), Boolean(type)), _classNames), className); var svgClassString = (0, _classnames["default"])(_defineProperty({}, "anticon-spin", !!spin || type === 'loading')); var svgStyle = rotate ? { msTransform: "rotate(".concat(rotate, "deg)"), transform: "rotate(".concat(rotate, "deg)") } : undefined; var innerSvgProps = _extends(_extends({}, _utils.svgBaseProps), { className: svgClassString, style: svgStyle, viewBox: viewBox }); if (!viewBox) { delete innerSvgProps.viewBox; } var renderInnerNode = function renderInnerNode() { // component > children > type if (Component) { return React.createElement(Component, innerSvgProps, children); } if (children) { (0, _warning["default"])(Boolean(viewBox) || React.Children.count(children) === 1 && React.isValidElement(children) && React.Children.only(children).type === 'use', 'Icon', 'Make sure that you provide correct `viewBox`' + ' prop (default `0 0 1024 1024`) to the icon.'); return React.createElement("svg", _extends({}, innerSvgProps, { viewBox: viewBox }), children); } if (typeof type === 'string') { var computedType = type; if (theme) { var themeInName = (0, _utils.getThemeFromTypeName)(type); (0, _warning["default"])(!themeInName || theme === themeInName, 'Icon', "The icon name '".concat(type, "' already specify a theme '").concat(themeInName, "',") + " the 'theme' prop '".concat(theme, "' will be ignored.")); } computedType = (0, _utils.withThemeSuffix)((0, _utils.removeTypeTheme)((0, _utils.alias)(computedType)), dangerousTheme || theme || defaultTheme); return React.createElement(_iconsReact["default"], { className: svgClassString, type: computedType, primaryColor: twoToneColor, style: svgStyle }); } }; var iconTabIndex = tabIndex; if (iconTabIndex === undefined && onClick) { iconTabIndex = -1; } return React.createElement(_LocaleReceiver["default"], { componentName: "Icon" }, function (locale) { return React.createElement("i", _extends({ "aria-label": type && "".concat(locale.icon, ": ").concat(type) }, restProps, { tabIndex: iconTabIndex, onClick: onClick, className: classString }), renderInnerNode()); }); }; Icon.createFromIconfontCN = _IconFont["default"]; Icon.getTwoToneColor = _twoTonePrimaryColor.getTwoToneColor; Icon.setTwoToneColor = _twoTonePrimaryColor.setTwoToneColor; var _default = Icon; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 28 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(31); __webpack_require__(277); __webpack_require__(88); //# sourceMappingURL=css.js.map /***/ }), /* 29 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _Modal = _interopRequireWildcard(__webpack_require__(278)); var _confirm = _interopRequireDefault(__webpack_require__(697)); var _icon = _interopRequireDefault(__webpack_require__(27)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function modalWarn(props) { var config = _extends({ type: 'warning', icon: React.createElement(_icon["default"], { type: "exclamation-circle" }), okCancel: false }, props); return (0, _confirm["default"])(config); } _Modal["default"].info = function infoFn(props) { var config = _extends({ type: 'info', icon: React.createElement(_icon["default"], { type: "info-circle" }), okCancel: false }, props); return (0, _confirm["default"])(config); }; _Modal["default"].success = function successFn(props) { var config = _extends({ type: 'success', icon: React.createElement(_icon["default"], { type: "check-circle" }), okCancel: false }, props); return (0, _confirm["default"])(config); }; _Modal["default"].error = function errorFn(props) { var config = _extends({ type: 'error', icon: React.createElement(_icon["default"], { type: "close-circle" }), okCancel: false }, props); return (0, _confirm["default"])(config); }; _Modal["default"].warning = modalWarn; _Modal["default"].warn = modalWarn; _Modal["default"].confirm = function confirmFn(props) { var config = _extends({ type: 'confirm', okCancel: true }, props); return (0, _confirm["default"])(config); }; _Modal["default"].destroyAll = function destroyAllFn() { while (_Modal.destroyFns.length) { var close = _Modal.destroyFns.pop(); if (close) { close(); } } }; var _default = _Modal["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 30 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(40); var core = __webpack_require__(16); var ctx = __webpack_require__(55); var hide = __webpack_require__(48); var has = __webpack_require__(57); var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { var IS_FORCED = type & $export.F; var IS_GLOBAL = type & $export.G; var IS_STATIC = type & $export.S; var IS_PROTO = type & $export.P; var IS_BIND = type & $export.B; var IS_WRAP = type & $export.W; var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); var expProto = exports[PROTOTYPE]; var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]; var key, own, out; if (IS_GLOBAL) source = name; for (key in source) { // contains in native own = !IS_FORCED && target && target[key] !== undefined; if (own && has(exports, key)) continue; // export native or passed out = own ? target[key] : source[key]; // prevent global pollution for namespaces exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] // bind timers to global for call from export context : IS_BIND && own ? ctx(out, global) // wrap global constructors for prevent change them in library : IS_WRAP && target[key] == out ? (function (C) { var F = function (a, b, c) { if (this instanceof C) { switch (arguments.length) { case 0: return new C(); case 1: return new C(a); case 2: return new C(a, b); } return new C(a, b, c); } return C.apply(this, arguments); }; F[PROTOTYPE] = C[PROTOTYPE]; return F; // make static versions for prototype methods })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% if (IS_PROTO) { (exports.virtual || (exports.virtual = {}))[key] = out; // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out); } } }; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }), /* 31 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /* 32 */ /***/ (function(module, exports, __webpack_require__) { var store = __webpack_require__(143)('wks'); var uid = __webpack_require__(102); var Symbol = __webpack_require__(40).Symbol; var USE_SYMBOL = typeof Symbol == 'function'; var $exports = module.exports = function (name) { return store[name] || (store[name] = USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); }; $exports.store = store; /***/ }), /* 33 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseStartTime = parseStartTime; exports.parseEndTime = parseEndTime; exports.randomString = randomString; exports.queryString = queryString; exports.getSDK = getSDK; exports.getConfig = getConfig; exports.omit = omit; exports.callPlayer = callPlayer; exports.isObject = isObject; exports.isEqual = isEqual; exports.isMediaStream = isMediaStream; var _react = __webpack_require__(0); var _loadScript = _interopRequireDefault(__webpack_require__(771)); var _deepmerge = _interopRequireDefault(__webpack_require__(772)); var _props = __webpack_require__(112); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var MATCH_START_QUERY = /[?&#](?:start|t)=([0-9hms]+)/; var MATCH_END_QUERY = /[?&#]end=([0-9hms]+)/; var MATCH_START_STAMP = /(\d+)(h|m|s)/g; var MATCH_NUMERIC = /^\d+$/; // Parse YouTube URL for a start time param, ie ?t=1h14m30s // and return the start time in seconds function parseTimeParam(url, pattern) { var match = url.match(pattern); if (match) { var stamp = match[1]; if (stamp.match(MATCH_START_STAMP)) { return parseTimeString(stamp); } if (MATCH_NUMERIC.test(stamp)) { return parseInt(stamp); } } return undefined; } function parseTimeString(stamp) { var seconds = 0; var array = MATCH_START_STAMP.exec(stamp); while (array !== null) { var _array = array, _array2 = _slicedToArray(_array, 3), count = _array2[1], period = _array2[2]; if (period === 'h') seconds += parseInt(count, 10) * 60 * 60; if (period === 'm') seconds += parseInt(count, 10) * 60; if (period === 's') seconds += parseInt(count, 10); array = MATCH_START_STAMP.exec(stamp); } return seconds; } function parseStartTime(url) { return parseTimeParam(url, MATCH_START_QUERY); } function parseEndTime(url) { return parseTimeParam(url, MATCH_END_QUERY); } // http://stackoverflow.com/a/38622545 function randomString() { return Math.random().toString(36).substr(2, 5); } function queryString(object) { return Object.keys(object).map(function (key) { return "".concat(key, "=").concat(object[key]); }).join('&'); } // Util function to load an external SDK // or return the SDK if it is already loaded var requests = {}; function getSDK(url, sdkGlobal) { var sdkReady = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; var isLoaded = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : function () { return true; }; var fetchScript = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : _loadScript["default"]; if (window[sdkGlobal] && isLoaded(window[sdkGlobal])) { return Promise.resolve(window[sdkGlobal]); } return new Promise(function (resolve, reject) { // If we are already loading the SDK, add the resolve and reject // functions to the existing array of requests if (requests[url]) { requests[url].push({ resolve: resolve, reject: reject }); return; } requests[url] = [{ resolve: resolve, reject: reject }]; var onLoaded = function onLoaded(sdk) { // When loaded, resolve all pending request promises requests[url].forEach(function (request) { return request.resolve(sdk); }); }; if (sdkReady) { var previousOnReady = window[sdkReady]; window[sdkReady] = function () { if (previousOnReady) previousOnReady(); onLoaded(window[sdkGlobal]); }; } fetchScript(url, function (err) { if (err) { // Loading the SDK failed – reject all requests and // reset the array of requests for this SDK requests[url].forEach(function (request) { return request.reject(err); }); requests[url] = null; } else if (!sdkReady) { onLoaded(window[sdkGlobal]); } }); }); } function getConfig(props, defaultProps, showWarning) { var config = (0, _deepmerge["default"])(defaultProps.config, props.config); var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { for (var _iterator = _props.DEPRECATED_CONFIG_PROPS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var p = _step.value; if (props[p]) { var key = p.replace(/Config$/, ''); config = (0, _deepmerge["default"])(config, _defineProperty({}, key, props[p])); if (showWarning) { var link = 'https://github.com/CookPete/react-player#config-prop'; var message = "ReactPlayer: %c".concat(p, " %cis deprecated, please use the config prop instead \u2013 ").concat(link); console.warn(message, 'font-weight: bold', ''); } } } } catch (err) { _didIteratorError = true; _iteratorError = err; } finally { try { if (!_iteratorNormalCompletion && _iterator["return"] != null) { _iterator["return"](); } } finally { if (_didIteratorError) { throw _iteratorError; } } } return config; } function omit(object) { var _ref; for (var _len = arguments.length, arrays = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { arrays[_key - 1] = arguments[_key]; } var omitKeys = (_ref = []).concat.apply(_ref, arrays); var output = {}; var keys = Object.keys(object); for (var _i2 = 0, _keys = keys; _i2 < _keys.length; _i2++) { var key = _keys[_i2]; if (omitKeys.indexOf(key) === -1) { output[key] = object[key]; } } return output; } function callPlayer(method) { var _this$player; // Util method for calling a method on this.player // but guard against errors and console.warn instead if (!this.player || !this.player[method]) { var message = "ReactPlayer: ".concat(this.constructor.displayName, " player could not call %c").concat(method, "%c \u2013 "); if (!this.player) { message += 'The player was not available'; } else if (!this.player[method]) { message += 'The method was not available'; } console.warn(message, 'font-weight: bold', ''); return null; } for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { args[_key2 - 1] = arguments[_key2]; } return (_this$player = this.player)[method].apply(_this$player, args); } function isObject(val) { return val !== null && _typeof(val) === 'object'; } // Deep comparison of two objects, but ignoring functions // and React elements, for use in shouldComponentUpdate function isEqual(a, b) { if (typeof a === 'function' && typeof b === 'function') { return true; } if ((0, _react.isValidElement)(a) && (0, _react.isValidElement)(b)) { return true; } if (a instanceof Array && b instanceof Array) { if (a.length !== b.length) { return false; } for (var i = 0; i !== a.length; i++) { if (!isEqual(a[i], b[i])) { return false; } } return true; } if (isObject(a) && isObject(b)) { if (Object.keys(a).length !== Object.keys(b).length) { return false; } for (var _i3 = 0, _Object$keys = Object.keys(a); _i3 < _Object$keys.length; _i3++) { var key = _Object$keys[_i3]; if (!isEqual(a[key], b[key])) { return false; } } return true; } return a === b; } function isMediaStream(url) { return typeof window !== 'undefined' && typeof window.MediaStream !== 'undefined' && url instanceof window.MediaStream; } /***/ }), /* 34 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _defineProperty = __webpack_require__(231); var _defineProperty2 = _interopRequireDefault(_defineProperty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; (0, _defineProperty2.default)(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); /***/ }), /* 35 */ /***/ (function(module, exports) { var g; // This works in non-strict mode g = (function() { return this; })(); try { // This works if eval is allowed (see CSP) g = g || Function("return this")() || (1,eval)("this"); } catch(e) { // This works if the window reference is available if(typeof window === "object") g = window; } // g can still be undefined, but nothing to do about it... // We return undefined, instead of nothing here, so it's // easier to handle this case. if(!global) { ...} module.exports = g; /***/ }), /* 36 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var bind = __webpack_require__(225); var isBuffer = __webpack_require__(453); /*global toString:true*/ // utils is a library of generic helper functions non-specific to axios var toString = Object.prototype.toString; /** * Determine if a value is an Array * * @param {Object} val The value to test * @returns {boolean} True if value is an Array, otherwise false */ function isArray(val) { return toString.call(val) === '[object Array]'; } /** * Determine if a value is an ArrayBuffer * * @param {Object} val The value to test * @returns {boolean} True if value is an ArrayBuffer, otherwise false */ function isArrayBuffer(val) { return toString.call(val) === '[object ArrayBuffer]'; } /** * Determine if a value is a FormData * * @param {Object} val The value to test * @returns {boolean} True if value is an FormData, otherwise false */ function isFormData(val) { return (typeof FormData !== 'undefined') && (val instanceof FormData); } /** * Determine if a value is a view on an ArrayBuffer * * @param {Object} val The value to test * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false */ function isArrayBufferView(val) { var result; if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { result = ArrayBuffer.isView(val); } else { result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer); } return result; } /** * Determine if a value is a String * * @param {Object} val The value to test * @returns {boolean} True if value is a String, otherwise false */ function isString(val) { return typeof val === 'string'; } /** * Determine if a value is a Number * * @param {Object} val The value to test * @returns {boolean} True if value is a Number, otherwise false */ function isNumber(val) { return typeof val === 'number'; } /** * Determine if a value is undefined * * @param {Object} val The value to test * @returns {boolean} True if the value is undefined, otherwise false */ function isUndefined(val) { return typeof val === 'undefined'; } /** * Determine if a value is an Object * * @param {Object} val The value to test * @returns {boolean} True if value is an Object, otherwise false */ function isObject(val) { return val !== null && typeof val === 'object'; } /** * Determine if a value is a Date * * @param {Object} val The value to test * @returns {boolean} True if value is a Date, otherwise false */ function isDate(val) { return toString.call(val) === '[object Date]'; } /** * Determine if a value is a File * * @param {Object} val The value to test * @returns {boolean} True if value is a File, otherwise false */ function isFile(val) { return toString.call(val) === '[object File]'; } /** * Determine if a value is a Blob * * @param {Object} val The value to test * @returns {boolean} True if value is a Blob, otherwise false */ function isBlob(val) { return toString.call(val) === '[object Blob]'; } /** * Determine if a value is a Function * * @param {Object} val The value to test * @returns {boolean} True if value is a Function, otherwise false */ function isFunction(val) { return toString.call(val) === '[object Function]'; } /** * Determine if a value is a Stream * * @param {Object} val The value to test * @returns {boolean} True if value is a Stream, otherwise false */ function isStream(val) { return isObject(val) && isFunction(val.pipe); } /** * Determine if a value is a URLSearchParams object * * @param {Object} val The value to test * @returns {boolean} True if value is a URLSearchParams object, otherwise false */ function isURLSearchParams(val) { return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams; } /** * Trim excess whitespace off the beginning and end of a string * * @param {String} str The String to trim * @returns {String} The String freed of excess whitespace */ function trim(str) { return str.replace(/^\s*/, '').replace(/\s*$/, ''); } /** * Determine if we're running in a standard browser environment * * This allows axios to run in a web worker, and react-native. * Both environments support XMLHttpRequest, but not fully standard globals. * * web workers: * typeof window -> undefined * typeof document -> undefined * * react-native: * navigator.product -> 'ReactNative' */ function isStandardBrowserEnv() { if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') { return false; } return ( typeof window !== 'undefined' && typeof document !== 'undefined' ); } /** * Iterate over an Array or an Object invoking a function for each item. * * If `obj` is an Array callback will be called passing * the value, index, and complete array for each item. * * If 'obj' is an Object callback will be called passing * the value, key, and complete object for each property. * * @param {Object|Array} obj The object to iterate * @param {Function} fn The callback to invoke for each item */ function forEach(obj, fn) { // Don't bother if no value provided if (obj === null || typeof obj === 'undefined') { return; } // Force an array if not already something iterable if (typeof obj !== 'object') { /*eslint no-param-reassign:0*/ obj = [obj]; } if (isArray(obj)) { // Iterate over array values for (var i = 0, l = obj.length; i < l; i++) { fn.call(null, obj[i], i, obj); } } else { // Iterate over object keys for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { fn.call(null, obj[key], key, obj); } } } } /** * Accepts varargs expecting each argument to be an object, then * immutably merges the properties of each object and returns result. * * When multiple objects contain the same key the later object in * the arguments list will take precedence. * * Example: * * ```js * var result = merge({foo: 123}, {foo: 456}); * console.log(result.foo); // outputs 456 * ``` * * @param {Object} obj1 Object to merge * @returns {Object} Result of all merge properties */ function merge(/* obj1, obj2, obj3, ... */) { var result = {}; function assignValue(val, key) { if (typeof result[key] === 'object' && typeof val === 'object') { result[key] = merge(result[key], val); } else { result[key] = val; } } for (var i = 0, l = arguments.length; i < l; i++) { forEach(arguments[i], assignValue); } return result; } /** * Extends object a by mutably adding to it the properties of object b. * * @param {Object} a The object to be extended * @param {Object} b The object to copy properties from * @param {Object} thisArg The object to bind function to * @return {Object} The resulting value of object a */ function extend(a, b, thisArg) { forEach(b, function assignValue(val, key) { if (thisArg && typeof val === 'function') { a[key] = bind(val, thisArg); } else { a[key] = val; } }); return a; } module.exports = { isArray: isArray, isArrayBuffer: isArrayBuffer, isBuffer: isBuffer, isFormData: isFormData, isArrayBufferView: isArrayBufferView, isString: isString, isNumber: isNumber, isObject: isObject, isUndefined: isUndefined, isDate: isDate, isFile: isFile, isBlob: isBlob, isFunction: isFunction, isStream: isStream, isURLSearchParams: isURLSearchParams, isStandardBrowserEnv: isStandardBrowserEnv, forEach: forEach, merge: merge, extend: extend, trim: trim }; /***/ }), /* 37 */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(53); var IE8_DOM_DEFINE = __webpack_require__(234); var toPrimitive = __webpack_require__(137); var dP = Object.defineProperty; exports.f = __webpack_require__(41) ? Object.defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPrimitive(P, true); anObject(Attributes); if (IE8_DOM_DEFINE) try { return dP(O, P, Attributes); } catch (e) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; /***/ }), /* 38 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(31); __webpack_require__(472); //# sourceMappingURL=css.js.map /***/ }), /* 39 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _rcNotification = _interopRequireDefault(__webpack_require__(230)); var _icon = _interopRequireDefault(__webpack_require__(27)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } var notificationInstance = {}; var defaultDuration = 4.5; var defaultTop = 24; var defaultBottom = 24; var defaultPlacement = 'topRight'; var defaultGetContainer; var defaultCloseIcon; function setNotificationConfig(options) { var duration = options.duration, placement = options.placement, bottom = options.bottom, top = options.top, getContainer = options.getContainer, closeIcon = options.closeIcon; if (duration !== undefined) { defaultDuration = duration; } if (placement !== undefined) { defaultPlacement = placement; } if (bottom !== undefined) { defaultBottom = bottom; } if (top !== undefined) { defaultTop = top; } if (getContainer !== undefined) { defaultGetContainer = getContainer; } if (closeIcon !== undefined) { defaultCloseIcon = closeIcon; } } function getPlacementStyle(placement) { var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultTop; var bottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultBottom; var style; switch (placement) { case 'topLeft': style = { left: 0, top: top, bottom: 'auto' }; break; case 'topRight': style = { right: 0, top: top, bottom: 'auto' }; break; case 'bottomLeft': style = { left: 0, top: 'auto', bottom: bottom }; break; default: style = { right: 0, top: 'auto', bottom: bottom }; break; } return style; } function getNotificationInstance(_ref, callback) { var prefixCls = _ref.prefixCls, _ref$placement = _ref.placement, placement = _ref$placement === void 0 ? defaultPlacement : _ref$placement, _ref$getContainer = _ref.getContainer, getContainer = _ref$getContainer === void 0 ? defaultGetContainer : _ref$getContainer, top = _ref.top, bottom = _ref.bottom, _ref$closeIcon = _ref.closeIcon, closeIcon = _ref$closeIcon === void 0 ? defaultCloseIcon : _ref$closeIcon; var cacheKey = "".concat(prefixCls, "-").concat(placement); if (notificationInstance[cacheKey]) { callback(notificationInstance[cacheKey]); return; } var closeIconToRender = React.createElement("span", { className: "".concat(prefixCls, "-close-x") }, closeIcon || React.createElement(_icon["default"], { className: "".concat(prefixCls, "-close-icon"), type: "close" })); _rcNotification["default"].newInstance({ prefixCls: prefixCls, className: "".concat(prefixCls, "-").concat(placement), style: getPlacementStyle(placement, top, bottom), getContainer: getContainer, closeIcon: closeIconToRender }, function (notification) { notificationInstance[cacheKey] = notification; callback(notification); }); } var typeToIcon = { success: 'check-circle-o', info: 'info-circle-o', error: 'close-circle-o', warning: 'exclamation-circle-o' }; function notice(args) { var outerPrefixCls = args.prefixCls || 'ant-notification'; var prefixCls = "".concat(outerPrefixCls, "-notice"); var duration = args.duration === undefined ? defaultDuration : args.duration; var iconNode = null; if (args.icon) { iconNode = React.createElement("span", { className: "".concat(prefixCls, "-icon") }, args.icon); } else if (args.type) { var iconType = typeToIcon[args.type]; iconNode = React.createElement(_icon["default"], { className: "".concat(prefixCls, "-icon ").concat(prefixCls, "-icon-").concat(args.type), type: iconType }); } var autoMarginTag = !args.description && iconNode ? React.createElement("span", { className: "".concat(prefixCls, "-message-single-line-auto-margin") }) : null; var placement = args.placement, top = args.top, bottom = args.bottom, getContainer = args.getContainer, closeIcon = args.closeIcon; getNotificationInstance({ prefixCls: outerPrefixCls, placement: placement, top: top, bottom: bottom, getContainer: getContainer, closeIcon: closeIcon }, function (notification) { notification.notice({ content: React.createElement("div", { className: iconNode ? "".concat(prefixCls, "-with-icon") : '' }, iconNode, React.createElement("div", { className: "".concat(prefixCls, "-message") }, autoMarginTag, args.message), React.createElement("div", { className: "".concat(prefixCls, "-description") }, args.description), args.btn ? React.createElement("span", { className: "".concat(prefixCls, "-btn") }, args.btn) : null), duration: duration, closable: true, onClose: args.onClose, onClick: args.onClick, key: args.key, style: args.style || {}, className: args.className }); }); } var api = { open: notice, close: function close(key) { Object.keys(notificationInstance).forEach(function (cacheKey) { return notificationInstance[cacheKey].removeNotice(key); }); }, config: setNotificationConfig, destroy: function destroy() { Object.keys(notificationInstance).forEach(function (cacheKey) { notificationInstance[cacheKey].destroy(); delete notificationInstance[cacheKey]; }); } }; ['success', 'info', 'warning', 'error'].forEach(function (type) { api[type] = function (args) { return api.open(_extends(_extends({}, args), { type: type })); }; }); api.warn = api.warning; var _default = api; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 40 */ /***/ (function(module, exports) { // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func : Function('return this')(); if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef /***/ }), /* 41 */ /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty module.exports = !__webpack_require__(56)(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /* 42 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = createSinglePlayer; var _react = _interopRequireWildcard(__webpack_require__(0)); var _props = __webpack_require__(112); var _utils = __webpack_require__(33); var _Player = _interopRequireDefault(__webpack_require__(166)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var SUPPORTED_PROPS = Object.keys(_props.propTypes); function createSinglePlayer(activePlayer) { var _class, _temp; return _temp = _class = /*#__PURE__*/ function (_Component) { _inherits(SinglePlayer, _Component); function SinglePlayer() { var _getPrototypeOf2; var _this; _classCallCheck(this, SinglePlayer); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SinglePlayer)).call.apply(_getPrototypeOf2, [this].concat(args))); _defineProperty(_assertThisInitialized(_this), "config", (0, _utils.getConfig)(_this.props, _props.defaultProps, true)); _defineProperty(_assertThisInitialized(_this), "getDuration", function () { if (!_this.player) return null; return _this.player.getDuration(); }); _defineProperty(_assertThisInitialized(_this), "getCurrentTime", function () { if (!_this.player) return null; return _this.player.getCurrentTime(); }); _defineProperty(_assertThisInitialized(_this), "getSecondsLoaded", function () { if (!_this.player) return null; return _this.player.getSecondsLoaded(); }); _defineProperty(_assertThisInitialized(_this), "getInternalPlayer", function () { var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'player'; if (!_this.player) return null; return _this.player.getInternalPlayer(key); }); _defineProperty(_assertThisInitialized(_this), "seekTo", function (fraction, type) { if (!_this.player) return null; _this.player.seekTo(fraction, type); }); _defineProperty(_assertThisInitialized(_this), "ref", function (player) { _this.player = player; }); return _this; } _createClass(SinglePlayer, [{ key: "shouldComponentUpdate", value: function shouldComponentUpdate(nextProps) { return !(0, _utils.isEqual)(this.props, nextProps); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { this.config = (0, _utils.getConfig)(this.props, _props.defaultProps); } }, { key: "render", value: function render() { var _this$config$file = this.config.file, forceVideo = _this$config$file.forceVideo, forceAudio = _this$config$file.forceAudio, forceHLS = _this$config$file.forceHLS, forceDASH = _this$config$file.forceDASH; var skipCanPlay = forceVideo || forceAudio || forceHLS || forceDASH; if (!activePlayer.canPlay(this.props.url) && !skipCanPlay) { return null; } var _this$props = this.props, style = _this$props.style, width = _this$props.width, height = _this$props.height, Wrapper = _this$props.wrapper; var otherProps = (0, _utils.omit)(this.props, SUPPORTED_PROPS, _props.DEPRECATED_CONFIG_PROPS); return _react["default"].createElement(Wrapper, _extends({ style: _objectSpread({}, style, { width: width, height: height }) }, otherProps), _react["default"].createElement(_Player["default"], _extends({}, this.props, { ref: this.ref, activePlayer: activePlayer, config: this.config }))); } }]); return SinglePlayer; }(_react.Component), _defineProperty(_class, "displayName", "".concat(activePlayer.displayName, "Player")), _defineProperty(_class, "propTypes", _props.propTypes), _defineProperty(_class, "defaultProps", _props.defaultProps), _defineProperty(_class, "canPlay", activePlayer.canPlay), _temp; } /***/ }), /* 43 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "resetWarned", { enumerable: true, get: function get() { return _warning.resetWarned; } }); exports["default"] = void 0; var _warning = _interopRequireWildcard(__webpack_require__(420)); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } var _default = function _default(valid, component, message) { (0, _warning["default"])(valid, "[antd: ".concat(component, "] ").concat(message)); }; exports["default"] = _default; //# sourceMappingURL=warning.js.map /***/ }), /* 44 */ /***/ (function(module, exports) { module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }), /* 45 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = ownerDocument; function ownerDocument(node) { return node && node.ownerDocument || document; } module.exports = exports["default"]; /***/ }), /* 46 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(19); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); function omit(obj, fields) { var shallowCopy = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, obj); for (var i = 0; i < fields.length; i++) { var key = fields[i]; delete shallowCopy[key]; } return shallowCopy; } /* harmony default export */ __webpack_exports__["default"] = (omit); /***/ }), /* 47 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments * to provide information about what broke and what you were * expecting. * * The invariant message will be stripped in production, but the invariant * will remain to ensure logic does not differ in production. */ var invariant = function(condition, format, a, b, c, d, e, f) { if (false) { if (format === undefined) { throw new Error('invariant requires an error message argument'); } } if (!condition) { var error; if (format === undefined) { error = new Error( 'Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.' ); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error( format.replace(/%s/g, function() { return args[argIndex++]; }) ); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } }; module.exports = invariant; /***/ }), /* 48 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(37); var createDesc = __webpack_require__(82); module.exports = __webpack_require__(41) ? function (object, key, value) { return dP.f(object, key, createDesc(1, value)); } : function (object, key, value) { object[key] = value; return object; }; /***/ }), /* 49 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(360); /***/ }), /* 50 */ /***/ (function(module, exports) { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } module.exports = _interopRequireDefault; /***/ }), /* 51 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__ = __webpack_require__(435); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__BrowserRouter__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__HashRouter__ = __webpack_require__(440); /* unused harmony reexport HashRouter */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Link__ = __webpack_require__(216); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_2__Link__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MemoryRouter__ = __webpack_require__(441); /* unused harmony reexport MemoryRouter */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__NavLink__ = __webpack_require__(442); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return __WEBPACK_IMPORTED_MODULE_4__NavLink__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__Prompt__ = __webpack_require__(444); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return __WEBPACK_IMPORTED_MODULE_5__Prompt__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Redirect__ = __webpack_require__(445); /* unused harmony reexport Redirect */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__Route__ = __webpack_require__(218); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return __WEBPACK_IMPORTED_MODULE_7__Route__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Router__ = __webpack_require__(133); /* unused harmony reexport Router */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__StaticRouter__ = __webpack_require__(446); /* unused harmony reexport StaticRouter */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__Switch__ = __webpack_require__(447); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return __WEBPACK_IMPORTED_MODULE_10__Switch__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__generatePath__ = __webpack_require__(448); /* unused harmony reexport generatePath */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__matchPath__ = __webpack_require__(449); /* unused harmony reexport matchPath */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__withRouter__ = __webpack_require__(450); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return __WEBPACK_IMPORTED_MODULE_13__withRouter__["a"]; }); /***/ }), /* 52 */ /***/ (function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(138); var defined = __webpack_require__(140); module.exports = function (it) { return IObject(defined(it)); }; /***/ }), /* 53 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(44); module.exports = function (it) { if (!isObject(it)) throw TypeError(it + ' is not an object!'); return it; }; /***/ }), /* 54 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createBrowserHistory", function() { return createBrowserHistory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createHashHistory", function() { return createHashHistory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createMemoryHistory", function() { return createMemoryHistory; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createLocation", function() { return createLocation; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "locationsAreEqual", function() { return locationsAreEqual; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parsePath", function() { return parsePath; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createPath", function() { return createPath; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__ = __webpack_require__(436); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_resolve_pathname__ = __webpack_require__(437); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_value_equal__ = __webpack_require__(438); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_tiny_warning__ = __webpack_require__(439); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_tiny_invariant__ = __webpack_require__(351); function addLeadingSlash(path) { return path.charAt(0) === '/' ? path : '/' + path; } function stripLeadingSlash(path) { return path.charAt(0) === '/' ? path.substr(1) : path; } function hasBasename(path, prefix) { return new RegExp('^' + prefix + '(\\/|\\?|#|$)', 'i').test(path); } function stripBasename(path, prefix) { return hasBasename(path, prefix) ? path.substr(prefix.length) : path; } function stripTrailingSlash(path) { return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path; } function parsePath(path) { var pathname = path || '/'; var search = ''; var hash = ''; var hashIndex = pathname.indexOf('#'); if (hashIndex !== -1) { hash = pathname.substr(hashIndex); pathname = pathname.substr(0, hashIndex); } var searchIndex = pathname.indexOf('?'); if (searchIndex !== -1) { search = pathname.substr(searchIndex); pathname = pathname.substr(0, searchIndex); } return { pathname: pathname, search: search === '?' ? '' : search, hash: hash === '#' ? '' : hash }; } function createPath(location) { var pathname = location.pathname, search = location.search, hash = location.hash; var path = pathname || '/'; if (search && search !== '?') path += search.charAt(0) === '?' ? search : "?" + search; if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : "#" + hash; return path; } function createLocation(path, state, key, currentLocation) { var location; if (typeof path === 'string') { // Two-arg form: push(path, state) location = parsePath(path); location.state = state; } else { // One-arg form: push(location) location = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])({}, path); if (location.pathname === undefined) location.pathname = ''; if (location.search) { if (location.search.charAt(0) !== '?') location.search = '?' + location.search; } else { location.search = ''; } if (location.hash) { if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash; } else { location.hash = ''; } if (state !== undefined && location.state === undefined) location.state = state; } try { location.pathname = decodeURI(location.pathname); } catch (e) { if (e instanceof URIError) { throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.'); } else { throw e; } } if (key) location.key = key; if (currentLocation) { // Resolve incomplete/relative pathname relative to current location. if (!location.pathname) { location.pathname = currentLocation.pathname; } else if (location.pathname.charAt(0) !== '/') { location.pathname = Object(__WEBPACK_IMPORTED_MODULE_1_resolve_pathname__["a" /* default */])(location.pathname, currentLocation.pathname); } } else { // When there is no prior location and pathname is empty, set it to / if (!location.pathname) { location.pathname = '/'; } } return location; } function locationsAreEqual(a, b) { return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && Object(__WEBPACK_IMPORTED_MODULE_2_value_equal__["a" /* default */])(a.state, b.state); } function createTransitionManager() { var prompt = null; function setPrompt(nextPrompt) { false ? warning(prompt == null, 'A history supports only one prompt at a time') : void 0; prompt = nextPrompt; return function () { if (prompt === nextPrompt) prompt = null; }; } function confirmTransitionTo(location, action, getUserConfirmation, callback) { // TODO: If another transition starts while we're still confirming // the previous one, we may end up in a weird state. Figure out the // best way to handle this. if (prompt != null) { var result = typeof prompt === 'function' ? prompt(location, action) : prompt; if (typeof result === 'string') { if (typeof getUserConfirmation === 'function') { getUserConfirmation(result, callback); } else { false ? warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message') : void 0; callback(true); } } else { // Return false from a transition hook to cancel the transition. callback(result !== false); } } else { callback(true); } } var listeners = []; function appendListener(fn) { var isActive = true; function listener() { if (isActive) fn.apply(void 0, arguments); } listeners.push(listener); return function () { isActive = false; listeners = listeners.filter(function (item) { return item !== listener; }); }; } function notifyListeners() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } listeners.forEach(function (listener) { return listener.apply(void 0, args); }); } return { setPrompt: setPrompt, confirmTransitionTo: confirmTransitionTo, appendListener: appendListener, notifyListeners: notifyListeners }; } var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); function getConfirmation(message, callback) { callback(window.confirm(message)); // eslint-disable-line no-alert } /** * Returns true if the HTML5 history API is supported. Taken from Modernizr. * * https://github.com/Modernizr/Modernizr/blob/master/LICENSE * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586 */ function supportsHistory() { var ua = window.navigator.userAgent; if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false; return window.history && 'pushState' in window.history; } /** * Returns true if browser fires popstate on hash change. * IE10 and IE11 do not. */ function supportsPopStateOnHashChange() { return window.navigator.userAgent.indexOf('Trident') === -1; } /** * Returns false if using go(n) with hash history causes a full page reload. */ function supportsGoWithoutReloadUsingHash() { return window.navigator.userAgent.indexOf('Firefox') === -1; } /** * Returns true if a given popstate event is an extraneous WebKit event. * Accounts for the fact that Chrome on iOS fires real popstate events * containing undefined state when pressing the back button. */ function isExtraneousPopstateEvent(event) { event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1; } var PopStateEvent = 'popstate'; var HashChangeEvent = 'hashchange'; function getHistoryState() { try { return window.history.state || {}; } catch (e) { // IE 11 sometimes throws when accessing window.history.state // See https://github.com/ReactTraining/history/pull/289 return {}; } } /** * Creates a history object that uses the HTML5 history API including * pushState, replaceState, and the popstate event. */ function createBrowserHistory(props) { if (props === void 0) { props = {}; } !canUseDOM ? false ? invariant(false, 'Browser history needs a DOM') : Object(__WEBPACK_IMPORTED_MODULE_4_tiny_invariant__["a" /* default */])(false) : void 0; var globalHistory = window.history; var canUseHistory = supportsHistory(); var needsHashChangeListener = !supportsPopStateOnHashChange(); var _props = props, _props$forceRefresh = _props.forceRefresh, forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh, _props$getUserConfirm = _props.getUserConfirmation, getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm, _props$keyLength = _props.keyLength, keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength; var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : ''; function getDOMLocation(historyState) { var _ref = historyState || {}, key = _ref.key, state = _ref.state; var _window$location = window.location, pathname = _window$location.pathname, search = _window$location.search, hash = _window$location.hash; var path = pathname + search + hash; false ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".') : void 0; if (basename) path = stripBasename(path, basename); return createLocation(path, state, key); } function createKey() { return Math.random().toString(36).substr(2, keyLength); } var transitionManager = createTransitionManager(); function setState(nextState) { Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])(history, nextState); history.length = globalHistory.length; transitionManager.notifyListeners(history.location, history.action); } function handlePopState(event) { // Ignore extraneous popstate events in WebKit. if (isExtraneousPopstateEvent(event)) return; handlePop(getDOMLocation(event.state)); } function handleHashChange() { handlePop(getDOMLocation(getHistoryState())); } var forceNextPop = false; function handlePop(location) { if (forceNextPop) { forceNextPop = false; setState(); } else { var action = 'POP'; transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { if (ok) { setState({ action: action, location: location }); } else { revertPop(location); } }); } } function revertPop(fromLocation) { var toLocation = history.location; // TODO: We could probably make this more reliable by // keeping a list of keys we've seen in sessionStorage. // Instead, we just default to 0 for keys we don't know. var toIndex = allKeys.indexOf(toLocation.key); if (toIndex === -1) toIndex = 0; var fromIndex = allKeys.indexOf(fromLocation.key); if (fromIndex === -1) fromIndex = 0; var delta = toIndex - fromIndex; if (delta) { forceNextPop = true; go(delta); } } var initialLocation = getDOMLocation(getHistoryState()); var allKeys = [initialLocation.key]; // Public interface function createHref(location) { return basename + createPath(location); } function push(path, state) { false ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0; var action = 'PUSH'; var location = createLocation(path, state, createKey(), history.location); transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { if (!ok) return; var href = createHref(location); var key = location.key, state = location.state; if (canUseHistory) { globalHistory.pushState({ key: key, state: state }, null, href); if (forceRefresh) { window.location.href = href; } else { var prevIndex = allKeys.indexOf(history.location.key); var nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1); nextKeys.push(location.key); allKeys = nextKeys; setState({ action: action, location: location }); } } else { false ? warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0; window.location.href = href; } }); } function replace(path, state) { false ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0; var action = 'REPLACE'; var location = createLocation(path, state, createKey(), history.location); transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { if (!ok) return; var href = createHref(location); var key = location.key, state = location.state; if (canUseHistory) { globalHistory.replaceState({ key: key, state: state }, null, href); if (forceRefresh) { window.location.replace(href); } else { var prevIndex = allKeys.indexOf(history.location.key); if (prevIndex !== -1) allKeys[prevIndex] = location.key; setState({ action: action, location: location }); } } else { false ? warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0; window.location.replace(href); } }); } function go(n) { globalHistory.go(n); } function goBack() { go(-1); } function goForward() { go(1); } var listenerCount = 0; function checkDOMListeners(delta) { listenerCount += delta; if (listenerCount === 1 && delta === 1) { window.addEventListener(PopStateEvent, handlePopState); if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange); } else if (listenerCount === 0) { window.removeEventListener(PopStateEvent, handlePopState); if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange); } } var isBlocked = false; function block(prompt) { if (prompt === void 0) { prompt = false; } var unblock = transitionManager.setPrompt(prompt); if (!isBlocked) { checkDOMListeners(1); isBlocked = true; } return function () { if (isBlocked) { isBlocked = false; checkDOMListeners(-1); } return unblock(); }; } function listen(listener) { var unlisten = transitionManager.appendListener(listener); checkDOMListeners(1); return function () { checkDOMListeners(-1); unlisten(); }; } var history = { length: globalHistory.length, action: 'POP', location: initialLocation, createHref: createHref, push: push, replace: replace, go: go, goBack: goBack, goForward: goForward, block: block, listen: listen }; return history; } var HashChangeEvent$1 = 'hashchange'; var HashPathCoders = { hashbang: { encodePath: function encodePath(path) { return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path); }, decodePath: function decodePath(path) { return path.charAt(0) === '!' ? path.substr(1) : path; } }, noslash: { encodePath: stripLeadingSlash, decodePath: addLeadingSlash }, slash: { encodePath: addLeadingSlash, decodePath: addLeadingSlash } }; function getHashPath() { // We can't use window.location.hash here because it's not // consistent across browsers - Firefox will pre-decode it! var href = window.location.href; var hashIndex = href.indexOf('#'); return hashIndex === -1 ? '' : href.substring(hashIndex + 1); } function pushHashPath(path) { window.location.hash = path; } function replaceHashPath(path) { var hashIndex = window.location.href.indexOf('#'); window.location.replace(window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path); } function createHashHistory(props) { if (props === void 0) { props = {}; } !canUseDOM ? false ? invariant(false, 'Hash history needs a DOM') : Object(__WEBPACK_IMPORTED_MODULE_4_tiny_invariant__["a" /* default */])(false) : void 0; var globalHistory = window.history; var canGoWithoutReload = supportsGoWithoutReloadUsingHash(); var _props = props, _props$getUserConfirm = _props.getUserConfirmation, getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm, _props$hashType = _props.hashType, hashType = _props$hashType === void 0 ? 'slash' : _props$hashType; var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : ''; var _HashPathCoders$hashT = HashPathCoders[hashType], encodePath = _HashPathCoders$hashT.encodePath, decodePath = _HashPathCoders$hashT.decodePath; function getDOMLocation() { var path = decodePath(getHashPath()); false ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".') : void 0; if (basename) path = stripBasename(path, basename); return createLocation(path); } var transitionManager = createTransitionManager(); function setState(nextState) { Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])(history, nextState); history.length = globalHistory.length; transitionManager.notifyListeners(history.location, history.action); } var forceNextPop = false; var ignorePath = null; function handleHashChange() { var path = getHashPath(); var encodedPath = encodePath(path); if (path !== encodedPath) { // Ensure we always have a properly-encoded hash. replaceHashPath(encodedPath); } else { var location = getDOMLocation(); var prevLocation = history.location; if (!forceNextPop && locationsAreEqual(prevLocation, location)) return; // A hashchange doesn't always == location change. if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace. ignorePath = null; handlePop(location); } } function handlePop(location) { if (forceNextPop) { forceNextPop = false; setState(); } else { var action = 'POP'; transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { if (ok) { setState({ action: action, location: location }); } else { revertPop(location); } }); } } function revertPop(fromLocation) { var toLocation = history.location; // TODO: We could probably make this more reliable by // keeping a list of paths we've seen in sessionStorage. // Instead, we just default to 0 for paths we don't know. var toIndex = allPaths.lastIndexOf(createPath(toLocation)); if (toIndex === -1) toIndex = 0; var fromIndex = allPaths.lastIndexOf(createPath(fromLocation)); if (fromIndex === -1) fromIndex = 0; var delta = toIndex - fromIndex; if (delta) { forceNextPop = true; go(delta); } } // Ensure the hash is encoded properly before doing anything else. var path = getHashPath(); var encodedPath = encodePath(path); if (path !== encodedPath) replaceHashPath(encodedPath); var initialLocation = getDOMLocation(); var allPaths = [createPath(initialLocation)]; // Public interface function createHref(location) { return '#' + encodePath(basename + createPath(location)); } function push(path, state) { false ? warning(state === undefined, 'Hash history cannot push state; it is ignored') : void 0; var action = 'PUSH'; var location = createLocation(path, undefined, undefined, history.location); transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { if (!ok) return; var path = createPath(location); var encodedPath = encodePath(basename + path); var hashChanged = getHashPath() !== encodedPath; if (hashChanged) { // We cannot tell if a hashchange was caused by a PUSH, so we'd // rather setState here and ignore the hashchange. The caveat here // is that other hash histories in the page will consider it a POP. ignorePath = path; pushHashPath(encodedPath); var prevIndex = allPaths.lastIndexOf(createPath(history.location)); var nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1); nextPaths.push(path); allPaths = nextPaths; setState({ action: action, location: location }); } else { false ? warning(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack') : void 0; setState(); } }); } function replace(path, state) { false ? warning(state === undefined, 'Hash history cannot replace state; it is ignored') : void 0; var action = 'REPLACE'; var location = createLocation(path, undefined, undefined, history.location); transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { if (!ok) return; var path = createPath(location); var encodedPath = encodePath(basename + path); var hashChanged = getHashPath() !== encodedPath; if (hashChanged) { // We cannot tell if a hashchange was caused by a REPLACE, so we'd // rather setState here and ignore the hashchange. The caveat here // is that other hash histories in the page will consider it a POP. ignorePath = path; replaceHashPath(encodedPath); } var prevIndex = allPaths.indexOf(createPath(history.location)); if (prevIndex !== -1) allPaths[prevIndex] = path; setState({ action: action, location: location }); }); } function go(n) { false ? warning(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0; globalHistory.go(n); } function goBack() { go(-1); } function goForward() { go(1); } var listenerCount = 0; function checkDOMListeners(delta) { listenerCount += delta; if (listenerCount === 1 && delta === 1) { window.addEventListener(HashChangeEvent$1, handleHashChange); } else if (listenerCount === 0) { window.removeEventListener(HashChangeEvent$1, handleHashChange); } } var isBlocked = false; function block(prompt) { if (prompt === void 0) { prompt = false; } var unblock = transitionManager.setPrompt(prompt); if (!isBlocked) { checkDOMListeners(1); isBlocked = true; } return function () { if (isBlocked) { isBlocked = false; checkDOMListeners(-1); } return unblock(); }; } function listen(listener) { var unlisten = transitionManager.appendListener(listener); checkDOMListeners(1); return function () { checkDOMListeners(-1); unlisten(); }; } var history = { length: globalHistory.length, action: 'POP', location: initialLocation, createHref: createHref, push: push, replace: replace, go: go, goBack: goBack, goForward: goForward, block: block, listen: listen }; return history; } function clamp(n, lowerBound, upperBound) { return Math.min(Math.max(n, lowerBound), upperBound); } /** * Creates a history object that stores locations in memory. */ function createMemoryHistory(props) { if (props === void 0) { props = {}; } var _props = props, getUserConfirmation = _props.getUserConfirmation, _props$initialEntries = _props.initialEntries, initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries, _props$initialIndex = _props.initialIndex, initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex, _props$keyLength = _props.keyLength, keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength; var transitionManager = createTransitionManager(); function setState(nextState) { Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_extends__["a" /* default */])(history, nextState); history.length = history.entries.length; transitionManager.notifyListeners(history.location, history.action); } function createKey() { return Math.random().toString(36).substr(2, keyLength); } var index = clamp(initialIndex, 0, initialEntries.length - 1); var entries = initialEntries.map(function (entry) { return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey()); }); // Public interface var createHref = createPath; function push(path, state) { false ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0; var action = 'PUSH'; var location = createLocation(path, state, createKey(), history.location); transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { if (!ok) return; var prevIndex = history.index; var nextIndex = prevIndex + 1; var nextEntries = history.entries.slice(0); if (nextEntries.length > nextIndex) { nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location); } else { nextEntries.push(location); } setState({ action: action, location: location, index: nextIndex, entries: nextEntries }); }); } function replace(path, state) { false ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0; var action = 'REPLACE'; var location = createLocation(path, state, createKey(), history.location); transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { if (!ok) return; history.entries[history.index] = location; setState({ action: action, location: location }); }); } function go(n) { var nextIndex = clamp(history.index + n, 0, history.entries.length - 1); var action = 'POP'; var location = history.entries[nextIndex]; transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) { if (ok) { setState({ action: action, location: location, index: nextIndex }); } else { // Mimic the behavior of DOM histories by // causing a render after a cancelled POP. setState(); } }); } function goBack() { go(-1); } function goForward() { go(1); } function canGo(n) { var nextIndex = history.index + n; return nextIndex >= 0 && nextIndex < history.entries.length; } function block(prompt) { if (prompt === void 0) { prompt = false; } return transitionManager.setPrompt(prompt); } function listen(listener) { return transitionManager.appendListener(listener); } var history = { length: entries.length, action: 'POP', location: entries[index], index: index, entries: entries, createHref: createHref, push: push, replace: replace, go: go, goBack: goBack, goForward: goForward, canGo: canGo, block: block, listen: listen }; return history; } /***/ }), /* 55 */ /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding var aFunction = __webpack_require__(233); module.exports = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; switch (length) { case 1: return function (a) { return fn.call(that, a); }; case 2: return function (a, b) { return fn.call(that, a, b); }; case 3: return function (a, b, c) { return fn.call(that, a, b, c); }; } return function (/* ...args */) { return fn.apply(that, arguments); }; }; /***/ }), /* 56 */ /***/ (function(module, exports) { module.exports = function (exec) { try { return !!exec(); } catch (e) { return true; } }; /***/ }), /* 57 */ /***/ (function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; /***/ }), /* 58 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__propertyUtils__ = __webpack_require__(713); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source; var getComputedStyleX = void 0; // https://stackoverflow.com/a/3485654/3040605 function forceRelayout(elem) { var originalStyle = elem.style.display; elem.style.display = 'none'; elem.offsetHeight; // eslint-disable-line elem.style.display = originalStyle; } function css(el, name, v) { var value = v; if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') { for (var i in name) { if (name.hasOwnProperty(i)) { css(el, i, name[i]); } } return undefined; } if (typeof value !== 'undefined') { if (typeof value === 'number') { value = value + 'px'; } el.style[name] = value; return undefined; } return getComputedStyleX(el, name); } function getClientPosition(elem) { var box = void 0; var x = void 0; var y = void 0; var doc = elem.ownerDocument; var body = doc.body; var docElem = doc && doc.documentElement; // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式 box = elem.getBoundingClientRect(); // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确 // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin x = box.left; y = box.top; // In IE, most of the time, 2 extra pixels are added to the top and left // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and // IE6 standards mode, this border can be overridden by setting the // document element's border to zero -- thus, we cannot rely on the // offset always being 2 pixels. // In quirks mode, the offset can be determined by querying the body's // clientLeft/clientTop, but in standards mode, it is found by querying // the document element's clientLeft/clientTop. Since we already called // getClientBoundingRect we have already forced a reflow, so it is not // too expensive just to query them all. // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的 // 窗口边框标准是设 documentElement ,quirks 时设置 body // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去 // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置 // 标准 ie 下 docElem.clientTop 就是 border-top // ie7 html 即窗口边框改变不了。永远为 2 // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0 x -= docElem.clientLeft || body.clientLeft || 0; y -= docElem.clientTop || body.clientTop || 0; return { left: x, top: y }; } function getScroll(w, top) { var ret = w['page' + (top ? 'Y' : 'X') + 'Offset']; var method = 'scroll' + (top ? 'Top' : 'Left'); if (typeof ret !== 'number') { var d = w.document; // ie6,7,8 standard mode ret = d.documentElement[method]; if (typeof ret !== 'number') { // quirks mode ret = d.body[method]; } } return ret; } function getScrollLeft(w) { return getScroll(w); } function getScrollTop(w) { return getScroll(w, true); } function getOffset(el) { var pos = getClientPosition(el); var doc = el.ownerDocument; var w = doc.defaultView || doc.parentWindow; pos.left += getScrollLeft(w); pos.top += getScrollTop(w); return pos; } /** * A crude way of determining if an object is a window * @member util */ function isWindow(obj) { // must use == for ie8 /* eslint eqeqeq:0 */ return obj !== null && obj !== undefined && obj == obj.window; } function getDocument(node) { if (isWindow(node)) { return node.document; } if (node.nodeType === 9) { return node; } return node.ownerDocument; } function _getComputedStyle(elem, name, cs) { var computedStyle = cs; var val = ''; var d = getDocument(elem); computedStyle = computedStyle || d.defaultView.getComputedStyle(elem, null); // https://github.com/kissyteam/kissy/issues/61 if (computedStyle) { val = computedStyle.getPropertyValue(name) || computedStyle[name]; } return val; } var _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i'); var RE_POS = /^(top|right|bottom|left)$/; var CURRENT_STYLE = 'currentStyle'; var RUNTIME_STYLE = 'runtimeStyle'; var LEFT = 'left'; var PX = 'px'; function _getComputedStyleIE(elem, name) { // currentStyle maybe null // http://msdn.microsoft.com/en-us/library/ms535231.aspx var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name]; // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值 // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19 // 在 ie 下不对,需要直接用 offset 方式 // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了 // From the awesome hack by Dean Edwards // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // If we're not dealing with a regular pixel number // but a number that has a weird ending, we need to convert it to pixels // exclude left right for relativity if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) { // Remember the original values var style = elem.style; var left = style[LEFT]; var rsLeft = elem[RUNTIME_STYLE][LEFT]; // prevent flashing of content elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT]; // Put in the new values to get a computed value out style[LEFT] = name === 'fontSize' ? '1em' : ret || 0; ret = style.pixelLeft + PX; // Revert the changed values style[LEFT] = left; elem[RUNTIME_STYLE][LEFT] = rsLeft; } return ret === '' ? 'auto' : ret; } if (typeof window !== 'undefined') { getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE; } function getOffsetDirection(dir, option) { if (dir === 'left') { return option.useCssRight ? 'right' : dir; } return option.useCssBottom ? 'bottom' : dir; } function oppositeOffsetDirection(dir) { if (dir === 'left') { return 'right'; } else if (dir === 'right') { return 'left'; } else if (dir === 'top') { return 'bottom'; } else if (dir === 'bottom') { return 'top'; } } // 设置 elem 相对 elem.ownerDocument 的坐标 function setLeftTop(elem, offset, option) { // set position first, in-case top/left are set even on static elem if (css(elem, 'position') === 'static') { elem.style.position = 'relative'; } var presetH = -999; var presetV = -999; var horizontalProperty = getOffsetDirection('left', option); var verticalProperty = getOffsetDirection('top', option); var oppositeHorizontalProperty = oppositeOffsetDirection(horizontalProperty); var oppositeVerticalProperty = oppositeOffsetDirection(verticalProperty); if (horizontalProperty !== 'left') { presetH = 999; } if (verticalProperty !== 'top') { presetV = 999; } var originalTransition = ''; var originalOffset = getOffset(elem); if ('left' in offset || 'top' in offset) { originalTransition = Object(__WEBPACK_IMPORTED_MODULE_0__propertyUtils__["c" /* getTransitionProperty */])(elem) || ''; Object(__WEBPACK_IMPORTED_MODULE_0__propertyUtils__["e" /* setTransitionProperty */])(elem, 'none'); } if ('left' in offset) { elem.style[oppositeHorizontalProperty] = ''; elem.style[horizontalProperty] = presetH + 'px'; } if ('top' in offset) { elem.style[oppositeVerticalProperty] = ''; elem.style[verticalProperty] = presetV + 'px'; } // force relayout forceRelayout(elem); var old = getOffset(elem); var originalStyle = {}; for (var key in offset) { if (offset.hasOwnProperty(key)) { var dir = getOffsetDirection(key, option); var preset = key === 'left' ? presetH : presetV; var off = originalOffset[key] - old[key]; if (dir === key) { originalStyle[dir] = preset + off; } else { originalStyle[dir] = preset - off; } } } css(elem, originalStyle); // force relayout forceRelayout(elem); if ('left' in offset || 'top' in offset) { Object(__WEBPACK_IMPORTED_MODULE_0__propertyUtils__["e" /* setTransitionProperty */])(elem, originalTransition); } var ret = {}; for (var _key in offset) { if (offset.hasOwnProperty(_key)) { var _dir = getOffsetDirection(_key, option); var _off = offset[_key] - originalOffset[_key]; if (_key === _dir) { ret[_dir] = originalStyle[_dir] + _off; } else { ret[_dir] = originalStyle[_dir] - _off; } } } css(elem, ret); } function setTransform(elem, offset) { var originalOffset = getOffset(elem); var originalXY = Object(__WEBPACK_IMPORTED_MODULE_0__propertyUtils__["b" /* getTransformXY */])(elem); var resultXY = { x: originalXY.x, y: originalXY.y }; if ('left' in offset) { resultXY.x = originalXY.x + offset.left - originalOffset.left; } if ('top' in offset) { resultXY.y = originalXY.y + offset.top - originalOffset.top; } Object(__WEBPACK_IMPORTED_MODULE_0__propertyUtils__["d" /* setTransformXY */])(elem, resultXY); } function setOffset(elem, offset, option) { if (option.ignoreShake) { var oriOffset = getOffset(elem); var oLeft = oriOffset.left.toFixed(0); var oTop = oriOffset.top.toFixed(0); var tLeft = offset.left.toFixed(0); var tTop = offset.top.toFixed(0); if (oLeft === tLeft && oTop === tTop) { return; } } if (option.useCssRight || option.useCssBottom) { setLeftTop(elem, offset, option); } else if (option.useCssTransform && Object(__WEBPACK_IMPORTED_MODULE_0__propertyUtils__["a" /* getTransformName */])() in document.body.style) { setTransform(elem, offset, option); } else { setLeftTop(elem, offset, option); } } function each(arr, fn) { for (var i = 0; i < arr.length; i++) { fn(arr[i]); } } function isBorderBoxFn(elem) { return getComputedStyleX(elem, 'boxSizing') === 'border-box'; } var BOX_MODELS = ['margin', 'border', 'padding']; var CONTENT_INDEX = -1; var PADDING_INDEX = 2; var BORDER_INDEX = 1; var MARGIN_INDEX = 0; function swap(elem, options, callback) { var old = {}; var style = elem.style; var name = void 0; // Remember the old values, and insert the new ones for (name in options) { if (options.hasOwnProperty(name)) { old[name] = style[name]; style[name] = options[name]; } } callback.call(elem); // Revert the old values for (name in options) { if (options.hasOwnProperty(name)) { style[name] = old[name]; } } } function getPBMWidth(elem, props, which) { var value = 0; var prop = void 0; var j = void 0; var i = void 0; for (j = 0; j < props.length; j++) { prop = props[j]; if (prop) { for (i = 0; i < which.length; i++) { var cssProp = void 0; if (prop === 'border') { cssProp = '' + prop + which[i] + 'Width'; } else { cssProp = prop + which[i]; } value += parseFloat(getComputedStyleX(elem, cssProp)) || 0; } } } return value; } var domUtils = {}; each(['Width', 'Height'], function (name) { domUtils['doc' + name] = function (refWin) { var d = refWin.document; return Math.max( // firefox chrome documentElement.scrollHeight< body.scrollHeight // ie standard mode : documentElement.scrollHeight> body.scrollHeight d.documentElement['scroll' + name], // quirks : documentElement.scrollHeight 最大等于可视窗口多一点? d.body['scroll' + name], domUtils['viewport' + name](d)); }; domUtils['viewport' + name] = function (win) { // pc browser includes scrollbar in window.innerWidth var prop = 'client' + name; var doc = win.document; var body = doc.body; var documentElement = doc.documentElement; var documentElementProp = documentElement[prop]; // 标准模式取 documentElement // backcompat 取 body return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp; }; }); /* 得到元素的大小信息 @param elem @param name @param {String} [extra] 'padding' : (css width) + padding 'border' : (css width) + padding + border 'margin' : (css width) + padding + border + margin */ function getWH(elem, name, ex) { var extra = ex; if (isWindow(elem)) { return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem); } else if (elem.nodeType === 9) { return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem); } var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; var borderBoxValue = name === 'width' ? elem.getBoundingClientRect().width : elem.getBoundingClientRect().height; var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem, computedStyle); var cssBoxValue = 0; if (borderBoxValue === null || borderBoxValue === undefined || borderBoxValue <= 0) { borderBoxValue = undefined; // Fall back to computed then un computed css if necessary cssBoxValue = getComputedStyleX(elem, name); if (cssBoxValue === null || cssBoxValue === undefined || Number(cssBoxValue) < 0) { cssBoxValue = elem.style[name] || 0; } // Normalize '', auto, and prepare for extra cssBoxValue = parseFloat(cssBoxValue) || 0; } if (extra === undefined) { extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX; } var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox; var val = borderBoxValue || cssBoxValue; if (extra === CONTENT_INDEX) { if (borderBoxValueOrIsBorderBox) { return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle); } return cssBoxValue; } else if (borderBoxValueOrIsBorderBox) { if (extra === BORDER_INDEX) { return val; } return val + (extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle)); } return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle); } var cssShow = { position: 'absolute', visibility: 'hidden', display: 'block' }; // fix #119 : https://github.com/kissyteam/kissy/issues/119 function getWHIgnoreDisplay() { for (var _len = arguments.length, args = Array(_len), _key2 = 0; _key2 < _len; _key2++) { args[_key2] = arguments[_key2]; } var val = void 0; var elem = args[0]; // in case elem is window // elem.offsetWidth === undefined if (elem.offsetWidth !== 0) { val = getWH.apply(undefined, args); } else { swap(elem, cssShow, function () { val = getWH.apply(undefined, args); }); } return val; } each(['width', 'height'], function (name) { var first = name.charAt(0).toUpperCase() + name.slice(1); domUtils['outer' + first] = function (el, includeMargin) { return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX); }; var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; domUtils[name] = function (elem, v) { var val = v; if (val !== undefined) { if (elem) { var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem); if (isBorderBox) { val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle); } return css(elem, name, val); } return undefined; } return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX); }; }); function mix(to, from) { for (var i in from) { if (from.hasOwnProperty(i)) { to[i] = from[i]; } } return to; } var utils = { getWindow: function getWindow(node) { if (node && node.document && node.setTimeout) { return node; } var doc = node.ownerDocument || node; return doc.defaultView || doc.parentWindow; }, getDocument: getDocument, offset: function offset(el, value, option) { if (typeof value !== 'undefined') { setOffset(el, value, option || {}); } else { return getOffset(el); } }, isWindow: isWindow, each: each, css: css, clone: function clone(obj) { var i = void 0; var ret = {}; for (i in obj) { if (obj.hasOwnProperty(i)) { ret[i] = obj[i]; } } var overflow = obj.overflow; if (overflow) { for (i in obj) { if (obj.hasOwnProperty(i)) { ret.overflow[i] = obj.overflow[i]; } } } return ret; }, mix: mix, getWindowScrollLeft: function getWindowScrollLeft(w) { return getScrollLeft(w); }, getWindowScrollTop: function getWindowScrollTop(w) { return getScrollTop(w); }, merge: function merge() { var ret = {}; for (var _len2 = arguments.length, args = Array(_len2), _key3 = 0; _key3 < _len2; _key3++) { args[_key3] = arguments[_key3]; } for (var i = 0; i < args.length; i++) { utils.mix(ret, args[i]); } return ret; }, viewportWidth: 0, viewportHeight: 0 }; mix(utils, domUtils); /* harmony default export */ __webpack_exports__["a"] = (utils); /***/ }), /* 59 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _defineProperty = __webpack_require__(231); var _defineProperty2 = _interopRequireDefault(_defineProperty); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (obj, key, value) { if (key in obj) { (0, _defineProperty2.default)(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }; /***/ }), /* 60 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(31); __webpack_require__(203); __webpack_require__(88); //# sourceMappingURL=css.js.map /***/ }), /* 61 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _Input = _interopRequireDefault(__webpack_require__(84)); var _Group = _interopRequireDefault(__webpack_require__(640)); var _Search = _interopRequireDefault(__webpack_require__(641)); var _TextArea = _interopRequireDefault(__webpack_require__(393)); var _Password = _interopRequireDefault(__webpack_require__(653)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } _Input["default"].Group = _Group["default"]; _Input["default"].Search = _Search["default"]; _Input["default"].TextArea = _TextArea["default"]; _Input["default"].Password = _Password["default"]; var _default = _Input["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 62 */ /***/ (function(module, exports) { // module.exports = function shallowEqual(objA, objB, compare, compareContext) { var ret = compare ? compare.call(compareContext, objA, objB) : void 0; if (ret !== void 0) { return !!ret; } if (objA === objB) { return true; } if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) { return false; } var keysA = Object.keys(objA); var keysB = Object.keys(objB); if (keysA.length !== keysB.length) { return false; } var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); // Test for A's keys different from B. for (var idx = 0; idx < keysA.length; idx++) { var key = keysA[idx]; if (!bHasOwnProperty(key)) { return false; } var valueA = objA[key]; var valueB = objB[key]; ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0; if (ret === false || (ret === void 0 && valueA !== valueB)) { return false; } } return true; }; /***/ }), /* 63 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* object-assign (c) Sindre Sorhus @license MIT */ /* eslint-disable no-unused-vars */ var getOwnPropertySymbols = Object.getOwnPropertySymbols; var hasOwnProperty = Object.prototype.hasOwnProperty; var propIsEnumerable = Object.prototype.propertyIsEnumerable; function toObject(val) { if (val === null || val === undefined) { throw new TypeError('Object.assign cannot be called with null or undefined'); } return Object(val); } function shouldUseNative() { try { if (!Object.assign) { return false; } // Detect buggy property enumeration order in older V8 versions. // https://bugs.chromium.org/p/v8/issues/detail?id=4118 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers test1[5] = 'de'; if (Object.getOwnPropertyNames(test1)[0] === '5') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test2 = {}; for (var i = 0; i < 10; i++) { test2['_' + String.fromCharCode(i)] = i; } var order2 = Object.getOwnPropertyNames(test2).map(function (n) { return test2[n]; }); if (order2.join('') !== '0123456789') { return false; } // https://bugs.chromium.org/p/v8/issues/detail?id=3056 var test3 = {}; 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { test3[letter] = letter; }); if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') { return false; } return true; } catch (err) { // We don't expect any of the above to throw, but better to be safe. return false; } } module.exports = shouldUseNative() ? Object.assign : function (target, source) { var from; var to = toObject(target); var symbols; for (var s = 1; s < arguments.length; s++) { from = Object(arguments[s]); for (var key in from) { if (hasOwnProperty.call(from, key)) { to[key] = from[key]; } } if (getOwnPropertySymbols) { symbols = getOwnPropertySymbols(from); for (var i = 0; i < symbols.length; i++) { if (propIsEnumerable.call(from, symbols[i])) { to[symbols[i]] = from[symbols[i]]; } } } } return to; }; /***/ }), /* 64 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /** * Similar to invariant but only logs a warning if the condition is not met. * This can be used to log issues in development environments in critical * paths. Removing the logging code for production environments will keep the * same logic and follow the same code paths. */ var __DEV__ = "production" !== 'production'; var warning = function() {}; if (__DEV__) { var printWarning = function printWarning(format, args) { var len = arguments.length; args = new Array(len > 1 ? len - 1 : 0); for (var key = 1; key < len; key++) { args[key - 1] = arguments[key]; } var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function() { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // --- Welcome to debugging React --- // This error was thrown as a convenience so that you can use this stack // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} } warning = function(condition, format, args) { var len = arguments.length; args = new Array(len > 2 ? len - 2 : 0); for (var key = 2; key < len; key++) { args[key - 2] = arguments[key]; } if (format === undefined) { throw new Error( '`warning(condition, format, ...args)` requires a warning ' + 'message argument' ); } if (!condition) { printWarning.apply(null, [format].concat(args)); } }; } module.exports = warning; /***/ }), /* 65 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) var defined = __webpack_require__(140); module.exports = function (it) { return Object(defined(it)); }; /***/ }), /* 66 */ /***/ (function(module, exports) { module.exports = {}; /***/ }), /* 67 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _warning = __webpack_require__(15); var _warning2 = _interopRequireDefault(_warning); var _toCss = __webpack_require__(155); var _toCss2 = _interopRequireDefault(_toCss); var _toCssValue = __webpack_require__(106); var _toCssValue2 = _interopRequireDefault(_toCssValue); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var StyleRule = function () { function StyleRule(key, style, options) { _classCallCheck(this, StyleRule); this.type = 'style'; this.isProcessed = false; var sheet = options.sheet, Renderer = options.Renderer, selector = options.selector; this.key = key; this.options = options; this.style = style; if (selector) this.selectorText = selector; this.renderer = sheet ? sheet.renderer : new Renderer(); } /** * Set selector string. * Attention: use this with caution. Most browsers didn't implement * selectorText setter, so this may result in rerendering of entire Style Sheet. */ _createClass(StyleRule, [{ key: 'prop', /** * Get or set a style property. */ value: function prop(name, value) { // It's a getter. if (value === undefined) return this.style[name]; // Don't do anything if the value has not changed. if (this.style[name] === value) return this; value = this.options.jss.plugins.onChangeValue(value, name, this); var isEmpty = value == null || value === false; var isDefined = name in this.style; // Value is empty and wasn't defined before. if (isEmpty && !isDefined) return this; // We are going to remove this value. var remove = isEmpty && isDefined; if (remove) delete this.style[name];else this.style[name] = value; // Renderable is defined if StyleSheet option `link` is true. if (this.renderable) { if (remove) this.renderer.removeProperty(this.renderable, name);else this.renderer.setProperty(this.renderable, name, value); return this; } var sheet = this.options.sheet; if (sheet && sheet.attached) { (0, _warning2['default'])(false, 'Rule is not linked. Missing sheet option "link: true".'); } return this; } /** * Apply rule to an element inline. */ }, { key: 'applyTo', value: function applyTo(renderable) { var json = this.toJSON(); for (var prop in json) { this.renderer.setProperty(renderable, prop, json[prop]); }return this; } /** * Returns JSON representation of the rule. * Fallbacks are not supported. * Useful for inline styles. */ }, { key: 'toJSON', value: function toJSON() { var json = {}; for (var prop in this.style) { var value = this.style[prop]; if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) !== 'object') json[prop] = value;else if (Array.isArray(value)) json[prop] = (0, _toCssValue2['default'])(value); } return json; } /** * Generates a CSS string. */ }, { key: 'toString', value: function toString(options) { var sheet = this.options.sheet; var link = sheet ? sheet.options.link : false; var opts = link ? _extends({}, options, { allowEmpty: true }) : options; return (0, _toCss2['default'])(this.selector, this.style, opts); } }, { key: 'selector', set: function set(selector) { if (selector === this.selectorText) return; this.selectorText = selector; if (!this.renderable) return; var hasChanged = this.renderer.setSelector(this.renderable, selector); // If selector setter is not implemented, rerender the rule. if (!hasChanged && this.renderable) { var renderable = this.renderer.replaceRule(this.renderable, this); if (renderable) this.renderable = renderable; } } /** * Get selector string. */ , get: function get() { return this.selectorText; } }]); return StyleRule; }(); exports['default'] = StyleRule; /***/ }), /* 68 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {var assign = make_assign() var create = make_create() var trim = make_trim() var Global = (typeof window !== 'undefined' ? window : global) module.exports = { assign: assign, create: create, trim: trim, bind: bind, slice: slice, each: each, map: map, pluck: pluck, isList: isList, isFunction: isFunction, isObject: isObject, Global: Global } function make_assign() { if (Object.assign) { return Object.assign } else { return function shimAssign(obj, props1, props2, etc) { for (var i = 1; i < arguments.length; i++) { each(Object(arguments[i]), function(val, key) { obj[key] = val }) } return obj } } } function make_create() { if (Object.create) { return function create(obj, assignProps1, assignProps2, etc) { var assignArgsList = slice(arguments, 1) return assign.apply(this, [Object.create(obj)].concat(assignArgsList)) } } else { function F() {} // eslint-disable-line no-inner-declarations return function create(obj, assignProps1, assignProps2, etc) { var assignArgsList = slice(arguments, 1) F.prototype = obj return assign.apply(this, [new F()].concat(assignArgsList)) } } } function make_trim() { if (String.prototype.trim) { return function trim(str) { return String.prototype.trim.call(str) } } else { return function trim(str) { return str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '') } } } function bind(obj, fn) { return function() { return fn.apply(obj, Array.prototype.slice.call(arguments, 0)) } } function slice(arr, index) { return Array.prototype.slice.call(arr, index || 0) } function each(obj, fn) { pluck(obj, function(val, key) { fn(val, key) return false }) } function map(obj, fn) { var res = (isList(obj) ? [] : {}) pluck(obj, function(v, k) { res[k] = fn(v, k) return false }) return res } function pluck(obj, fn) { if (isList(obj)) { for (var i=0; i>> 0; for (var i = 0; i < len; i++) { if (i in t && fun.call(this, t[i], i, t)) { return true; } } return false; }; } function isValid(m) { if (m._isValid == null) { var flags = getParsingFlags(m); var parsedParts = some.call(flags.parsedDateParts, function (i) { return i != null; }); var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || (flags.meridiem && parsedParts)); if (m._strict) { isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined; } if (Object.isFrozen == null || !Object.isFrozen(m)) { m._isValid = isNowValid; } else { return isNowValid; } } return m._isValid; } function createInvalid (flags) { var m = createUTC(NaN); if (flags != null) { extend(getParsingFlags(m), flags); } else { getParsingFlags(m).userInvalidated = true; } return m; } // Plugins that add properties should also add the key here (null value), // so we can properly clone ourselves. var momentProperties = hooks.momentProperties = []; function copyConfig(to, from) { var i, prop, val; if (!isUndefined(from._isAMomentObject)) { to._isAMomentObject = from._isAMomentObject; } if (!isUndefined(from._i)) { to._i = from._i; } if (!isUndefined(from._f)) { to._f = from._f; } if (!isUndefined(from._l)) { to._l = from._l; } if (!isUndefined(from._strict)) { to._strict = from._strict; } if (!isUndefined(from._tzm)) { to._tzm = from._tzm; } if (!isUndefined(from._isUTC)) { to._isUTC = from._isUTC; } if (!isUndefined(from._offset)) { to._offset = from._offset; } if (!isUndefined(from._pf)) { to._pf = getParsingFlags(from); } if (!isUndefined(from._locale)) { to._locale = from._locale; } if (momentProperties.length > 0) { for (i = 0; i < momentProperties.length; i++) { prop = momentProperties[i]; val = from[prop]; if (!isUndefined(val)) { to[prop] = val; } } } return to; } var updateInProgress = false; // Moment prototype object function Moment(config) { copyConfig(this, config); this._d = new Date(config._d != null ? config._d.getTime() : NaN); if (!this.isValid()) { this._d = new Date(NaN); } // Prevent infinite loop in case updateOffset creates new moment // objects. if (updateInProgress === false) { updateInProgress = true; hooks.updateOffset(this); updateInProgress = false; } } function isMoment (obj) { return obj instanceof Moment || (obj != null && obj._isAMomentObject != null); } function absFloor (number) { if (number < 0) { // -0 -> 0 return Math.ceil(number) || 0; } else { return Math.floor(number); } } function toInt(argumentForCoercion) { var coercedNumber = +argumentForCoercion, value = 0; if (coercedNumber !== 0 && isFinite(coercedNumber)) { value = absFloor(coercedNumber); } return value; } // compare two arrays, return the number of differences function compareArrays(array1, array2, dontConvert) { var len = Math.min(array1.length, array2.length), lengthDiff = Math.abs(array1.length - array2.length), diffs = 0, i; for (i = 0; i < len; i++) { if ((dontConvert && array1[i] !== array2[i]) || (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { diffs++; } } return diffs + lengthDiff; } function warn(msg) { if (hooks.suppressDeprecationWarnings === false && (typeof console !== 'undefined') && console.warn) { console.warn('Deprecation warning: ' + msg); } } function deprecate(msg, fn) { var firstTime = true; return extend(function () { if (hooks.deprecationHandler != null) { hooks.deprecationHandler(null, msg); } if (firstTime) { var args = []; var arg; for (var i = 0; i < arguments.length; i++) { arg = ''; if (typeof arguments[i] === 'object') { arg += '\n[' + i + '] '; for (var key in arguments[0]) { arg += key + ': ' + arguments[0][key] + ', '; } arg = arg.slice(0, -2); // Remove trailing comma and space } else { arg = arguments[i]; } args.push(arg); } warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack); firstTime = false; } return fn.apply(this, arguments); }, fn); } var deprecations = {}; function deprecateSimple(name, msg) { if (hooks.deprecationHandler != null) { hooks.deprecationHandler(name, msg); } if (!deprecations[name]) { warn(msg); deprecations[name] = true; } } hooks.suppressDeprecationWarnings = false; hooks.deprecationHandler = null; function isFunction(input) { return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; } function set (config) { var prop, i; for (i in config) { prop = config[i]; if (isFunction(prop)) { this[i] = prop; } else { this['_' + i] = prop; } } this._config = config; // Lenient ordinal parsing accepts just a number in addition to // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. // TODO: Remove "ordinalParse" fallback in next major release. this._dayOfMonthOrdinalParseLenient = new RegExp( (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + (/\d{1,2}/).source); } function mergeConfigs(parentConfig, childConfig) { var res = extend({}, parentConfig), prop; for (prop in childConfig) { if (hasOwnProp(childConfig, prop)) { if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { res[prop] = {}; extend(res[prop], parentConfig[prop]); extend(res[prop], childConfig[prop]); } else if (childConfig[prop] != null) { res[prop] = childConfig[prop]; } else { delete res[prop]; } } } for (prop in parentConfig) { if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) { // make sure changes to properties don't modify parent config res[prop] = extend({}, res[prop]); } } return res; } function Locale(config) { if (config != null) { this.set(config); } } var keys; if (Object.keys) { keys = Object.keys; } else { keys = function (obj) { var i, res = []; for (i in obj) { if (hasOwnProp(obj, i)) { res.push(i); } } return res; }; } var defaultCalendar = { sameDay : '[Today at] LT', nextDay : '[Tomorrow at] LT', nextWeek : 'dddd [at] LT', lastDay : '[Yesterday at] LT', lastWeek : '[Last] dddd [at] LT', sameElse : 'L' }; function calendar (key, mom, now) { var output = this._calendar[key] || this._calendar['sameElse']; return isFunction(output) ? output.call(mom, now) : output; } var defaultLongDateFormat = { LTS : 'h:mm:ss A', LT : 'h:mm A', L : 'MM/DD/YYYY', LL : 'MMMM D, YYYY', LLL : 'MMMM D, YYYY h:mm A', LLLL : 'dddd, MMMM D, YYYY h:mm A' }; function longDateFormat (key) { var format = this._longDateFormat[key], formatUpper = this._longDateFormat[key.toUpperCase()]; if (format || !formatUpper) { return format; } this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { return val.slice(1); }); return this._longDateFormat[key]; } var defaultInvalidDate = 'Invalid date'; function invalidDate () { return this._invalidDate; } var defaultOrdinal = '%d'; var defaultDayOfMonthOrdinalParse = /\d{1,2}/; function ordinal (number) { return this._ordinal.replace('%d', number); } var defaultRelativeTime = { future : 'in %s', past : '%s ago', s : 'a few seconds', ss : '%d seconds', m : 'a minute', mm : '%d minutes', h : 'an hour', hh : '%d hours', d : 'a day', dd : '%d days', M : 'a month', MM : '%d months', y : 'a year', yy : '%d years' }; function relativeTime (number, withoutSuffix, string, isFuture) { var output = this._relativeTime[string]; return (isFunction(output)) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); } function pastFuture (diff, output) { var format = this._relativeTime[diff > 0 ? 'future' : 'past']; return isFunction(format) ? format(output) : format.replace(/%s/i, output); } var aliases = {}; function addUnitAlias (unit, shorthand) { var lowerCase = unit.toLowerCase(); aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; } function normalizeUnits(units) { return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; } function normalizeObjectUnits(inputObject) { var normalizedInput = {}, normalizedProp, prop; for (prop in inputObject) { if (hasOwnProp(inputObject, prop)) { normalizedProp = normalizeUnits(prop); if (normalizedProp) { normalizedInput[normalizedProp] = inputObject[prop]; } } } return normalizedInput; } var priorities = {}; function addUnitPriority(unit, priority) { priorities[unit] = priority; } function getPrioritizedUnits(unitsObj) { var units = []; for (var u in unitsObj) { units.push({unit: u, priority: priorities[u]}); } units.sort(function (a, b) { return a.priority - b.priority; }); return units; } function zeroFill(number, targetLength, forceSign) { var absNumber = '' + Math.abs(number), zerosToFill = targetLength - absNumber.length, sign = number >= 0; return (sign ? (forceSign ? '+' : '') : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; } var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; var formatFunctions = {}; var formatTokenFunctions = {}; // token: 'M' // padded: ['MM', 2] // ordinal: 'Mo' // callback: function () { this.month() + 1 } function addFormatToken (token, padded, ordinal, callback) { var func = callback; if (typeof callback === 'string') { func = function () { return this[callback](); }; } if (token) { formatTokenFunctions[token] = func; } if (padded) { formatTokenFunctions[padded[0]] = function () { return zeroFill(func.apply(this, arguments), padded[1], padded[2]); }; } if (ordinal) { formatTokenFunctions[ordinal] = function () { return this.localeData().ordinal(func.apply(this, arguments), token); }; } } function removeFormattingTokens(input) { if (input.match(/\[[\s\S]/)) { return input.replace(/^\[|\]$/g, ''); } return input.replace(/\\/g, ''); } function makeFormatFunction(format) { var array = format.match(formattingTokens), i, length; for (i = 0, length = array.length; i < length; i++) { if (formatTokenFunctions[array[i]]) { array[i] = formatTokenFunctions[array[i]]; } else { array[i] = removeFormattingTokens(array[i]); } } return function (mom) { var output = '', i; for (i = 0; i < length; i++) { output += isFunction(array[i]) ? array[i].call(mom, format) : array[i]; } return output; }; } // format date using native date object function formatMoment(m, format) { if (!m.isValid()) { return m.localeData().invalidDate(); } format = expandFormat(format, m.localeData()); formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); return formatFunctions[format](m); } function expandFormat(format, locale) { var i = 5; function replaceLongDateFormatTokens(input) { return locale.longDateFormat(input) || input; } localFormattingTokens.lastIndex = 0; while (i >= 0 && localFormattingTokens.test(format)) { format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); localFormattingTokens.lastIndex = 0; i -= 1; } return format; } var match1 = /\d/; // 0 - 9 var match2 = /\d\d/; // 00 - 99 var match3 = /\d{3}/; // 000 - 999 var match4 = /\d{4}/; // 0000 - 9999 var match6 = /[+-]?\d{6}/; // -999999 - 999999 var match1to2 = /\d\d?/; // 0 - 99 var match3to4 = /\d\d\d\d?/; // 999 - 9999 var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 var match1to3 = /\d{1,3}/; // 0 - 999 var match1to4 = /\d{1,4}/; // 0 - 9999 var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 var matchUnsigned = /\d+/; // 0 - inf var matchSigned = /[+-]?\d+/; // -inf - inf var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 // any word (or two) characters or numbers including two/three word month in arabic. // includes scottish gaelic two word and hyphenated months var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i; var regexes = {}; function addRegexToken (token, regex, strictRegex) { regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { return (isStrict && strictRegex) ? strictRegex : regex; }; } function getParseRegexForToken (token, config) { if (!hasOwnProp(regexes, token)) { return new RegExp(unescapeFormat(token)); } return regexes[token](config._strict, config._locale); } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript function unescapeFormat(s) { return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { return p1 || p2 || p3 || p4; })); } function regexEscape(s) { return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); } var tokens = {}; function addParseToken (token, callback) { var i, func = callback; if (typeof token === 'string') { token = [token]; } if (isNumber(callback)) { func = function (input, array) { array[callback] = toInt(input); }; } for (i = 0; i < token.length; i++) { tokens[token[i]] = func; } } function addWeekParseToken (token, callback) { addParseToken(token, function (input, array, config, token) { config._w = config._w || {}; callback(input, config._w, config, token); }); } function addTimeToArrayFromToken(token, input, config) { if (input != null && hasOwnProp(tokens, token)) { tokens[token](input, config._a, config, token); } } var YEAR = 0; var MONTH = 1; var DATE = 2; var HOUR = 3; var MINUTE = 4; var SECOND = 5; var MILLISECOND = 6; var WEEK = 7; var WEEKDAY = 8; // FORMATTING addFormatToken('Y', 0, 0, function () { var y = this.year(); return y <= 9999 ? '' + y : '+' + y; }); addFormatToken(0, ['YY', 2], 0, function () { return this.year() % 100; }); addFormatToken(0, ['YYYY', 4], 0, 'year'); addFormatToken(0, ['YYYYY', 5], 0, 'year'); addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES addUnitAlias('year', 'y'); // PRIORITIES addUnitPriority('year', 1); // PARSING addRegexToken('Y', matchSigned); addRegexToken('YY', match1to2, match2); addRegexToken('YYYY', match1to4, match4); addRegexToken('YYYYY', match1to6, match6); addRegexToken('YYYYYY', match1to6, match6); addParseToken(['YYYYY', 'YYYYYY'], YEAR); addParseToken('YYYY', function (input, array) { array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); }); addParseToken('YY', function (input, array) { array[YEAR] = hooks.parseTwoDigitYear(input); }); addParseToken('Y', function (input, array) { array[YEAR] = parseInt(input, 10); }); // HELPERS function daysInYear(year) { return isLeapYear(year) ? 366 : 365; } function isLeapYear(year) { return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; } // HOOKS hooks.parseTwoDigitYear = function (input) { return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); }; // MOMENTS var getSetYear = makeGetSet('FullYear', true); function getIsLeapYear () { return isLeapYear(this.year()); } function makeGetSet (unit, keepTime) { return function (value) { if (value != null) { set$1(this, unit, value); hooks.updateOffset(this, keepTime); return this; } else { return get(this, unit); } }; } function get (mom, unit) { return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; } function set$1 (mom, unit, value) { if (mom.isValid() && !isNaN(value)) { if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) { mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month())); } else { mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); } } } // MOMENTS function stringGet (units) { units = normalizeUnits(units); if (isFunction(this[units])) { return this[units](); } return this; } function stringSet (units, value) { if (typeof units === 'object') { units = normalizeObjectUnits(units); var prioritized = getPrioritizedUnits(units); for (var i = 0; i < prioritized.length; i++) { this[prioritized[i].unit](units[prioritized[i].unit]); } } else { units = normalizeUnits(units); if (isFunction(this[units])) { return this[units](value); } } return this; } function mod(n, x) { return ((n % x) + x) % x; } var indexOf; if (Array.prototype.indexOf) { indexOf = Array.prototype.indexOf; } else { indexOf = function (o) { // I know var i; for (i = 0; i < this.length; ++i) { if (this[i] === o) { return i; } } return -1; }; } function daysInMonth(year, month) { if (isNaN(year) || isNaN(month)) { return NaN; } var modMonth = mod(month, 12); year += (month - modMonth) / 12; return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2); } // FORMATTING addFormatToken('M', ['MM', 2], 'Mo', function () { return this.month() + 1; }); addFormatToken('MMM', 0, 0, function (format) { return this.localeData().monthsShort(this, format); }); addFormatToken('MMMM', 0, 0, function (format) { return this.localeData().months(this, format); }); // ALIASES addUnitAlias('month', 'M'); // PRIORITY addUnitPriority('month', 8); // PARSING addRegexToken('M', match1to2); addRegexToken('MM', match1to2, match2); addRegexToken('MMM', function (isStrict, locale) { return locale.monthsShortRegex(isStrict); }); addRegexToken('MMMM', function (isStrict, locale) { return locale.monthsRegex(isStrict); }); addParseToken(['M', 'MM'], function (input, array) { array[MONTH] = toInt(input) - 1; }); addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid. if (month != null) { array[MONTH] = month; } else { getParsingFlags(config).invalidMonth = input; } }); // LOCALES var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/; var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); function localeMonths (m, format) { if (!m) { return isArray(this._months) ? this._months : this._months['standalone']; } return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; } var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); function localeMonthsShort (m, format) { if (!m) { return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone']; } return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; } function handleStrictParse(monthName, format, strict) { var i, ii, mom, llc = monthName.toLocaleLowerCase(); if (!this._monthsParse) { // this is not used this._monthsParse = []; this._longMonthsParse = []; this._shortMonthsParse = []; for (i = 0; i < 12; ++i) { mom = createUTC([2000, i]); this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); } } if (strict) { if (format === 'MMM') { ii = indexOf.call(this._shortMonthsParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._longMonthsParse, llc); return ii !== -1 ? ii : null; } } else { if (format === 'MMM') { ii = indexOf.call(this._shortMonthsParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._longMonthsParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._longMonthsParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._shortMonthsParse, llc); return ii !== -1 ? ii : null; } } } function localeMonthsParse (monthName, format, strict) { var i, mom, regex; if (this._monthsParseExact) { return handleStrictParse.call(this, monthName, format, strict); } if (!this._monthsParse) { this._monthsParse = []; this._longMonthsParse = []; this._shortMonthsParse = []; } // TODO: add sorting // Sorting makes sure if one month (or abbr) is a prefix of another // see sorting in computeMonthsParse for (i = 0; i < 12; i++) { // make the regex if we don't have it already mom = createUTC([2000, i]); if (strict && !this._longMonthsParse[i]) { this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); } if (!strict && !this._monthsParse[i]) { regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); } // test the regex if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { return i; } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { return i; } else if (!strict && this._monthsParse[i].test(monthName)) { return i; } } } // MOMENTS function setMonth (mom, value) { var dayOfMonth; if (!mom.isValid()) { // No op return mom; } if (typeof value === 'string') { if (/^\d+$/.test(value)) { value = toInt(value); } else { value = mom.localeData().monthsParse(value); // TODO: Another silent failure? if (!isNumber(value)) { return mom; } } } dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); return mom; } function getSetMonth (value) { if (value != null) { setMonth(this, value); hooks.updateOffset(this, true); return this; } else { return get(this, 'Month'); } } function getDaysInMonth () { return daysInMonth(this.year(), this.month()); } var defaultMonthsShortRegex = matchWord; function monthsShortRegex (isStrict) { if (this._monthsParseExact) { if (!hasOwnProp(this, '_monthsRegex')) { computeMonthsParse.call(this); } if (isStrict) { return this._monthsShortStrictRegex; } else { return this._monthsShortRegex; } } else { if (!hasOwnProp(this, '_monthsShortRegex')) { this._monthsShortRegex = defaultMonthsShortRegex; } return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex; } } var defaultMonthsRegex = matchWord; function monthsRegex (isStrict) { if (this._monthsParseExact) { if (!hasOwnProp(this, '_monthsRegex')) { computeMonthsParse.call(this); } if (isStrict) { return this._monthsStrictRegex; } else { return this._monthsRegex; } } else { if (!hasOwnProp(this, '_monthsRegex')) { this._monthsRegex = defaultMonthsRegex; } return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex; } } function computeMonthsParse () { function cmpLenRev(a, b) { return b.length - a.length; } var shortPieces = [], longPieces = [], mixedPieces = [], i, mom; for (i = 0; i < 12; i++) { // make the regex if we don't have it already mom = createUTC([2000, i]); shortPieces.push(this.monthsShort(mom, '')); longPieces.push(this.months(mom, '')); mixedPieces.push(this.months(mom, '')); mixedPieces.push(this.monthsShort(mom, '')); } // Sorting makes sure if one month (or abbr) is a prefix of another it // will match the longer piece. shortPieces.sort(cmpLenRev); longPieces.sort(cmpLenRev); mixedPieces.sort(cmpLenRev); for (i = 0; i < 12; i++) { shortPieces[i] = regexEscape(shortPieces[i]); longPieces[i] = regexEscape(longPieces[i]); } for (i = 0; i < 24; i++) { mixedPieces[i] = regexEscape(mixedPieces[i]); } this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); this._monthsShortRegex = this._monthsRegex; this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); } function createDate (y, m, d, h, M, s, ms) { // can't just apply() to create a date: // https://stackoverflow.com/q/181348 var date; // the date constructor remaps years 0-99 to 1900-1999 if (y < 100 && y >= 0) { // preserve leap years using a full 400 year cycle, then reset date = new Date(y + 400, m, d, h, M, s, ms); if (isFinite(date.getFullYear())) { date.setFullYear(y); } } else { date = new Date(y, m, d, h, M, s, ms); } return date; } function createUTCDate (y) { var date; // the Date.UTC function remaps years 0-99 to 1900-1999 if (y < 100 && y >= 0) { var args = Array.prototype.slice.call(arguments); // preserve leap years using a full 400 year cycle, then reset args[0] = y + 400; date = new Date(Date.UTC.apply(null, args)); if (isFinite(date.getUTCFullYear())) { date.setUTCFullYear(y); } } else { date = new Date(Date.UTC.apply(null, arguments)); } return date; } // start-of-first-week - start-of-year function firstWeekOffset(year, dow, doy) { var // first-week day -- which january is always in the first week (4 for iso, 1 for other) fwd = 7 + dow - doy, // first-week day local weekday -- which local weekday is fwd fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; return -fwdlw + fwd - 1; } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday function dayOfYearFromWeeks(year, week, weekday, dow, doy) { var localWeekday = (7 + weekday - dow) % 7, weekOffset = firstWeekOffset(year, dow, doy), dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, resYear, resDayOfYear; if (dayOfYear <= 0) { resYear = year - 1; resDayOfYear = daysInYear(resYear) + dayOfYear; } else if (dayOfYear > daysInYear(year)) { resYear = year + 1; resDayOfYear = dayOfYear - daysInYear(year); } else { resYear = year; resDayOfYear = dayOfYear; } return { year: resYear, dayOfYear: resDayOfYear }; } function weekOfYear(mom, dow, doy) { var weekOffset = firstWeekOffset(mom.year(), dow, doy), week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, resWeek, resYear; if (week < 1) { resYear = mom.year() - 1; resWeek = week + weeksInYear(resYear, dow, doy); } else if (week > weeksInYear(mom.year(), dow, doy)) { resWeek = week - weeksInYear(mom.year(), dow, doy); resYear = mom.year() + 1; } else { resYear = mom.year(); resWeek = week; } return { week: resWeek, year: resYear }; } function weeksInYear(year, dow, doy) { var weekOffset = firstWeekOffset(year, dow, doy), weekOffsetNext = firstWeekOffset(year + 1, dow, doy); return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; } // FORMATTING addFormatToken('w', ['ww', 2], 'wo', 'week'); addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES addUnitAlias('week', 'w'); addUnitAlias('isoWeek', 'W'); // PRIORITIES addUnitPriority('week', 5); addUnitPriority('isoWeek', 5); // PARSING addRegexToken('w', match1to2); addRegexToken('ww', match1to2, match2); addRegexToken('W', match1to2); addRegexToken('WW', match1to2, match2); addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { week[token.substr(0, 1)] = toInt(input); }); // HELPERS // LOCALES function localeWeek (mom) { return weekOfYear(mom, this._week.dow, this._week.doy).week; } var defaultLocaleWeek = { dow : 0, // Sunday is the first day of the week. doy : 6 // The week that contains Jan 6th is the first week of the year. }; function localeFirstDayOfWeek () { return this._week.dow; } function localeFirstDayOfYear () { return this._week.doy; } // MOMENTS function getSetWeek (input) { var week = this.localeData().week(this); return input == null ? week : this.add((input - week) * 7, 'd'); } function getSetISOWeek (input) { var week = weekOfYear(this, 1, 4).week; return input == null ? week : this.add((input - week) * 7, 'd'); } // FORMATTING addFormatToken('d', 0, 'do', 'day'); addFormatToken('dd', 0, 0, function (format) { return this.localeData().weekdaysMin(this, format); }); addFormatToken('ddd', 0, 0, function (format) { return this.localeData().weekdaysShort(this, format); }); addFormatToken('dddd', 0, 0, function (format) { return this.localeData().weekdays(this, format); }); addFormatToken('e', 0, 0, 'weekday'); addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES addUnitAlias('day', 'd'); addUnitAlias('weekday', 'e'); addUnitAlias('isoWeekday', 'E'); // PRIORITY addUnitPriority('day', 11); addUnitPriority('weekday', 11); addUnitPriority('isoWeekday', 11); // PARSING addRegexToken('d', match1to2); addRegexToken('e', match1to2); addRegexToken('E', match1to2); addRegexToken('dd', function (isStrict, locale) { return locale.weekdaysMinRegex(isStrict); }); addRegexToken('ddd', function (isStrict, locale) { return locale.weekdaysShortRegex(isStrict); }); addRegexToken('dddd', function (isStrict, locale) { return locale.weekdaysRegex(isStrict); }); addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid if (weekday != null) { week.d = weekday; } else { getParsingFlags(config).invalidWeekday = input; } }); addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { week[token] = toInt(input); }); // HELPERS function parseWeekday(input, locale) { if (typeof input !== 'string') { return input; } if (!isNaN(input)) { return parseInt(input, 10); } input = locale.weekdaysParse(input); if (typeof input === 'number') { return input; } return null; } function parseIsoWeekday(input, locale) { if (typeof input === 'string') { return locale.weekdaysParse(input) % 7 || 7; } return isNaN(input) ? null : input; } // LOCALES function shiftWeekdays (ws, n) { return ws.slice(n, 7).concat(ws.slice(0, n)); } var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); function localeWeekdays (m, format) { var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[(m && m !== true && this._weekdays.isFormat.test(format)) ? 'format' : 'standalone']; return (m === true) ? shiftWeekdays(weekdays, this._week.dow) : (m) ? weekdays[m.day()] : weekdays; } var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); function localeWeekdaysShort (m) { return (m === true) ? shiftWeekdays(this._weekdaysShort, this._week.dow) : (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort; } var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); function localeWeekdaysMin (m) { return (m === true) ? shiftWeekdays(this._weekdaysMin, this._week.dow) : (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin; } function handleStrictParse$1(weekdayName, format, strict) { var i, ii, mom, llc = weekdayName.toLocaleLowerCase(); if (!this._weekdaysParse) { this._weekdaysParse = []; this._shortWeekdaysParse = []; this._minWeekdaysParse = []; for (i = 0; i < 7; ++i) { mom = createUTC([2000, 1]).day(i); this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); } } if (strict) { if (format === 'dddd') { ii = indexOf.call(this._weekdaysParse, llc); return ii !== -1 ? ii : null; } else if (format === 'ddd') { ii = indexOf.call(this._shortWeekdaysParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._minWeekdaysParse, llc); return ii !== -1 ? ii : null; } } else { if (format === 'dddd') { ii = indexOf.call(this._weekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._shortWeekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._minWeekdaysParse, llc); return ii !== -1 ? ii : null; } else if (format === 'ddd') { ii = indexOf.call(this._shortWeekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._weekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._minWeekdaysParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._minWeekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._weekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._shortWeekdaysParse, llc); return ii !== -1 ? ii : null; } } } function localeWeekdaysParse (weekdayName, format, strict) { var i, mom, regex; if (this._weekdaysParseExact) { return handleStrictParse$1.call(this, weekdayName, format, strict); } if (!this._weekdaysParse) { this._weekdaysParse = []; this._minWeekdaysParse = []; this._shortWeekdaysParse = []; this._fullWeekdaysParse = []; } for (i = 0; i < 7; i++) { // make the regex if we don't have it already mom = createUTC([2000, 1]).day(i); if (strict && !this._fullWeekdaysParse[i]) { this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i'); this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i'); this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i'); } if (!this._weekdaysParse[i]) { regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); } // test the regex if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { return i; } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { return i; } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { return i; } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { return i; } } } // MOMENTS function getSetDayOfWeek (input) { if (!this.isValid()) { return input != null ? this : NaN; } var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); if (input != null) { input = parseWeekday(input, this.localeData()); return this.add(input - day, 'd'); } else { return day; } } function getSetLocaleDayOfWeek (input) { if (!this.isValid()) { return input != null ? this : NaN; } var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; return input == null ? weekday : this.add(input - weekday, 'd'); } function getSetISODayOfWeek (input) { if (!this.isValid()) { return input != null ? this : NaN; } // behaves the same as moment#day except // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) // as a setter, sunday should belong to the previous week. if (input != null) { var weekday = parseIsoWeekday(input, this.localeData()); return this.day(this.day() % 7 ? weekday : weekday - 7); } else { return this.day() || 7; } } var defaultWeekdaysRegex = matchWord; function weekdaysRegex (isStrict) { if (this._weekdaysParseExact) { if (!hasOwnProp(this, '_weekdaysRegex')) { computeWeekdaysParse.call(this); } if (isStrict) { return this._weekdaysStrictRegex; } else { return this._weekdaysRegex; } } else { if (!hasOwnProp(this, '_weekdaysRegex')) { this._weekdaysRegex = defaultWeekdaysRegex; } return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex; } } var defaultWeekdaysShortRegex = matchWord; function weekdaysShortRegex (isStrict) { if (this._weekdaysParseExact) { if (!hasOwnProp(this, '_weekdaysRegex')) { computeWeekdaysParse.call(this); } if (isStrict) { return this._weekdaysShortStrictRegex; } else { return this._weekdaysShortRegex; } } else { if (!hasOwnProp(this, '_weekdaysShortRegex')) { this._weekdaysShortRegex = defaultWeekdaysShortRegex; } return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex; } } var defaultWeekdaysMinRegex = matchWord; function weekdaysMinRegex (isStrict) { if (this._weekdaysParseExact) { if (!hasOwnProp(this, '_weekdaysRegex')) { computeWeekdaysParse.call(this); } if (isStrict) { return this._weekdaysMinStrictRegex; } else { return this._weekdaysMinRegex; } } else { if (!hasOwnProp(this, '_weekdaysMinRegex')) { this._weekdaysMinRegex = defaultWeekdaysMinRegex; } return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex; } } function computeWeekdaysParse () { function cmpLenRev(a, b) { return b.length - a.length; } var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], i, mom, minp, shortp, longp; for (i = 0; i < 7; i++) { // make the regex if we don't have it already mom = createUTC([2000, 1]).day(i); minp = this.weekdaysMin(mom, ''); shortp = this.weekdaysShort(mom, ''); longp = this.weekdays(mom, ''); minPieces.push(minp); shortPieces.push(shortp); longPieces.push(longp); mixedPieces.push(minp); mixedPieces.push(shortp); mixedPieces.push(longp); } // Sorting makes sure if one weekday (or abbr) is a prefix of another it // will match the longer piece. minPieces.sort(cmpLenRev); shortPieces.sort(cmpLenRev); longPieces.sort(cmpLenRev); mixedPieces.sort(cmpLenRev); for (i = 0; i < 7; i++) { shortPieces[i] = regexEscape(shortPieces[i]); longPieces[i] = regexEscape(longPieces[i]); mixedPieces[i] = regexEscape(mixedPieces[i]); } this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); this._weekdaysShortRegex = this._weekdaysRegex; this._weekdaysMinRegex = this._weekdaysRegex; this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); } // FORMATTING function hFormat() { return this.hours() % 12 || 12; } function kFormat() { return this.hours() || 24; } addFormatToken('H', ['HH', 2], 0, 'hour'); addFormatToken('h', ['hh', 2], 0, hFormat); addFormatToken('k', ['kk', 2], 0, kFormat); addFormatToken('hmm', 0, 0, function () { return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); }); addFormatToken('hmmss', 0, 0, function () { return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); }); addFormatToken('Hmm', 0, 0, function () { return '' + this.hours() + zeroFill(this.minutes(), 2); }); addFormatToken('Hmmss', 0, 0, function () { return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); }); function meridiem (token, lowercase) { addFormatToken(token, 0, 0, function () { return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); }); } meridiem('a', true); meridiem('A', false); // ALIASES addUnitAlias('hour', 'h'); // PRIORITY addUnitPriority('hour', 13); // PARSING function matchMeridiem (isStrict, locale) { return locale._meridiemParse; } addRegexToken('a', matchMeridiem); addRegexToken('A', matchMeridiem); addRegexToken('H', match1to2); addRegexToken('h', match1to2); addRegexToken('k', match1to2); addRegexToken('HH', match1to2, match2); addRegexToken('hh', match1to2, match2); addRegexToken('kk', match1to2, match2); addRegexToken('hmm', match3to4); addRegexToken('hmmss', match5to6); addRegexToken('Hmm', match3to4); addRegexToken('Hmmss', match5to6); addParseToken(['H', 'HH'], HOUR); addParseToken(['k', 'kk'], function (input, array, config) { var kInput = toInt(input); array[HOUR] = kInput === 24 ? 0 : kInput; }); addParseToken(['a', 'A'], function (input, array, config) { config._isPm = config._locale.isPM(input); config._meridiem = input; }); addParseToken(['h', 'hh'], function (input, array, config) { array[HOUR] = toInt(input); getParsingFlags(config).bigHour = true; }); addParseToken('hmm', function (input, array, config) { var pos = input.length - 2; array[HOUR] = toInt(input.substr(0, pos)); array[MINUTE] = toInt(input.substr(pos)); getParsingFlags(config).bigHour = true; }); addParseToken('hmmss', function (input, array, config) { var pos1 = input.length - 4; var pos2 = input.length - 2; array[HOUR] = toInt(input.substr(0, pos1)); array[MINUTE] = toInt(input.substr(pos1, 2)); array[SECOND] = toInt(input.substr(pos2)); getParsingFlags(config).bigHour = true; }); addParseToken('Hmm', function (input, array, config) { var pos = input.length - 2; array[HOUR] = toInt(input.substr(0, pos)); array[MINUTE] = toInt(input.substr(pos)); }); addParseToken('Hmmss', function (input, array, config) { var pos1 = input.length - 4; var pos2 = input.length - 2; array[HOUR] = toInt(input.substr(0, pos1)); array[MINUTE] = toInt(input.substr(pos1, 2)); array[SECOND] = toInt(input.substr(pos2)); }); // LOCALES function localeIsPM (input) { // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays // Using charAt should be more compatible. return ((input + '').toLowerCase().charAt(0) === 'p'); } var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; function localeMeridiem (hours, minutes, isLower) { if (hours > 11) { return isLower ? 'pm' : 'PM'; } else { return isLower ? 'am' : 'AM'; } } // MOMENTS // Setting the hour should keep the time, because the user explicitly // specified which hour they want. So trying to maintain the same hour (in // a new timezone) makes sense. Adding/subtracting hours does not follow // this rule. var getSetHour = makeGetSet('Hours', true); var baseConfig = { calendar: defaultCalendar, longDateFormat: defaultLongDateFormat, invalidDate: defaultInvalidDate, ordinal: defaultOrdinal, dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, relativeTime: defaultRelativeTime, months: defaultLocaleMonths, monthsShort: defaultLocaleMonthsShort, week: defaultLocaleWeek, weekdays: defaultLocaleWeekdays, weekdaysMin: defaultLocaleWeekdaysMin, weekdaysShort: defaultLocaleWeekdaysShort, meridiemParse: defaultLocaleMeridiemParse }; // internal storage for locale config files var locales = {}; var localeFamilies = {}; var globalLocale; function normalizeLocale(key) { return key ? key.toLowerCase().replace('_', '-') : key; } // pick the locale from the array // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root function chooseLocale(names) { var i = 0, j, next, locale, split; while (i < names.length) { split = normalizeLocale(names[i]).split('-'); j = split.length; next = normalizeLocale(names[i + 1]); next = next ? next.split('-') : null; while (j > 0) { locale = loadLocale(split.slice(0, j).join('-')); if (locale) { return locale; } if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { //the next array item is better than a shallower substring of this one break; } j--; } i++; } return globalLocale; } function loadLocale(name) { var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node if (!locales[name] && (typeof module !== 'undefined') && module && module.exports) { try { oldLocale = globalLocale._abbr; var aliasedRequire = require; !(function webpackMissingModule() { var e = new Error("Cannot find module \"./locale\""); e.code = 'MODULE_NOT_FOUND'; throw e; }()); getSetGlobalLocale(oldLocale); } catch (e) {} } return locales[name]; } // This function will load locale and then set the global locale. If // no arguments are passed in, it will simply return the current global // locale key. function getSetGlobalLocale (key, values) { var data; if (key) { if (isUndefined(values)) { data = getLocale(key); } else { data = defineLocale(key, values); } if (data) { // moment.duration._locale = moment._locale = data; globalLocale = data; } else { if ((typeof console !== 'undefined') && console.warn) { //warn user if arguments are passed but the locale could not be set console.warn('Locale ' + key + ' not found. Did you forget to load it?'); } } } return globalLocale._abbr; } function defineLocale (name, config) { if (config !== null) { var locale, parentConfig = baseConfig; config.abbr = name; if (locales[name] != null) { deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); parentConfig = locales[name]._config; } else if (config.parentLocale != null) { if (locales[config.parentLocale] != null) { parentConfig = locales[config.parentLocale]._config; } else { locale = loadLocale(config.parentLocale); if (locale != null) { parentConfig = locale._config; } else { if (!localeFamilies[config.parentLocale]) { localeFamilies[config.parentLocale] = []; } localeFamilies[config.parentLocale].push({ name: name, config: config }); return null; } } } locales[name] = new Locale(mergeConfigs(parentConfig, config)); if (localeFamilies[name]) { localeFamilies[name].forEach(function (x) { defineLocale(x.name, x.config); }); } // backwards compat for now: also set the locale // make sure we set the locale AFTER all child locales have been // created, so we won't end up with the child locale set. getSetGlobalLocale(name); return locales[name]; } else { // useful for testing delete locales[name]; return null; } } function updateLocale(name, config) { if (config != null) { var locale, tmpLocale, parentConfig = baseConfig; // MERGE tmpLocale = loadLocale(name); if (tmpLocale != null) { parentConfig = tmpLocale._config; } config = mergeConfigs(parentConfig, config); locale = new Locale(config); locale.parentLocale = locales[name]; locales[name] = locale; // backwards compat for now: also set the locale getSetGlobalLocale(name); } else { // pass null for config to unupdate, useful for tests if (locales[name] != null) { if (locales[name].parentLocale != null) { locales[name] = locales[name].parentLocale; } else if (locales[name] != null) { delete locales[name]; } } } return locales[name]; } // returns locale data function getLocale (key) { var locale; if (key && key._locale && key._locale._abbr) { key = key._locale._abbr; } if (!key) { return globalLocale; } if (!isArray(key)) { //short-circuit everything else locale = loadLocale(key); if (locale) { return locale; } key = [key]; } return chooseLocale(key); } function listLocales() { return keys(locales); } function checkOverflow (m) { var overflow; var a = m._a; if (a && getParsingFlags(m).overflow === -2) { overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1; if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { overflow = DATE; } if (getParsingFlags(m)._overflowWeeks && overflow === -1) { overflow = WEEK; } if (getParsingFlags(m)._overflowWeekday && overflow === -1) { overflow = WEEKDAY; } getParsingFlags(m).overflow = overflow; } return m; } // Pick the first defined of two or three arguments. function defaults(a, b, c) { if (a != null) { return a; } if (b != null) { return b; } return c; } function currentDateArray(config) { // hooks is actually the exported moment object var nowValue = new Date(hooks.now()); if (config._useUTC) { return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; } return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; } // convert an array to a date. // the array should mirror the parameters below // note: all values past the year are optional and will default to the lowest possible value. // [year, month, day , hour, minute, second, millisecond] function configFromArray (config) { var i, date, input = [], currentDate, expectedWeekday, yearToUse; if (config._d) { return; } currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { dayOfYearFromWeekInfo(config); } //if the day of the year is set, figure out what it is if (config._dayOfYear != null) { yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) { getParsingFlags(config)._overflowDayOfYear = true; } date = createUTCDate(yearToUse, 0, config._dayOfYear); config._a[MONTH] = date.getUTCMonth(); config._a[DATE] = date.getUTCDate(); } // Default to current date. // * if no year, month, day of month are given, default to today // * if day of month is given, default month and year // * if month is given, default only year // * if year is given, don't default anything for (i = 0; i < 3 && config._a[i] == null; ++i) { config._a[i] = input[i] = currentDate[i]; } // Zero out whatever was not defaulted, including time for (; i < 7; i++) { config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i]; } // Check for 24:00:00.000 if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) { config._nextDay = true; config._a[HOUR] = 0; } config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed // with parseZone. if (config._tzm != null) { config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); } if (config._nextDay) { config._a[HOUR] = 24; } // check for mismatching day of week if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) { getParsingFlags(config).weekdayMismatch = true; } } function dayOfYearFromWeekInfo(config) { var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; w = config._w; if (w.GG != null || w.W != null || w.E != null) { dow = 1; doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on // how we interpret now (local, utc, fixed offset). So create // a now version of current config (take local/utc/offset flags, and // create now). weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year); week = defaults(w.W, 1); weekday = defaults(w.E, 1); if (weekday < 1 || weekday > 7) { weekdayOverflow = true; } } else { dow = config._locale._week.dow; doy = config._locale._week.doy; var curWeek = weekOfYear(createLocal(), dow, doy); weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week. week = defaults(w.w, curWeek.week); if (w.d != null) { // weekday -- low day numbers are considered next week weekday = w.d; if (weekday < 0 || weekday > 6) { weekdayOverflow = true; } } else if (w.e != null) { // local weekday -- counting starts from beginning of week weekday = w.e + dow; if (w.e < 0 || w.e > 6) { weekdayOverflow = true; } } else { // default to beginning of week weekday = dow; } } if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { getParsingFlags(config)._overflowWeeks = true; } else if (weekdayOverflow != null) { getParsingFlags(config)._overflowWeekday = true; } else { temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); config._a[YEAR] = temp.year; config._dayOfYear = temp.dayOfYear; } } // iso 8601 regex // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; var isoDates = [ ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], ['GGGG-[W]WW', /\d{4}-W\d\d/, false], ['YYYY-DDD', /\d{4}-\d{3}/], ['YYYY-MM', /\d{4}-\d\d/, false], ['YYYYYYMMDD', /[+-]\d{10}/], ['YYYYMMDD', /\d{8}/], // YYYYMM is NOT allowed by the standard ['GGGG[W]WWE', /\d{4}W\d{3}/], ['GGGG[W]WW', /\d{4}W\d{2}/, false], ['YYYYDDD', /\d{7}/] ]; // iso time formats and regexes var isoTimes = [ ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], ['HH:mm:ss', /\d\d:\d\d:\d\d/], ['HH:mm', /\d\d:\d\d/], ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], ['HHmmss', /\d\d\d\d\d\d/], ['HHmm', /\d\d\d\d/], ['HH', /\d\d/] ]; var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; // date from iso format function configFromISO(config) { var i, l, string = config._i, match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), allowTime, dateFormat, timeFormat, tzFormat; if (match) { getParsingFlags(config).iso = true; for (i = 0, l = isoDates.length; i < l; i++) { if (isoDates[i][1].exec(match[1])) { dateFormat = isoDates[i][0]; allowTime = isoDates[i][2] !== false; break; } } if (dateFormat == null) { config._isValid = false; return; } if (match[3]) { for (i = 0, l = isoTimes.length; i < l; i++) { if (isoTimes[i][1].exec(match[3])) { // match[2] should be 'T' or space timeFormat = (match[2] || ' ') + isoTimes[i][0]; break; } } if (timeFormat == null) { config._isValid = false; return; } } if (!allowTime && timeFormat != null) { config._isValid = false; return; } if (match[4]) { if (tzRegex.exec(match[4])) { tzFormat = 'Z'; } else { config._isValid = false; return; } } config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); configFromStringAndFormat(config); } else { config._isValid = false; } } // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/; function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { var result = [ untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10) ]; if (secondStr) { result.push(parseInt(secondStr, 10)); } return result; } function untruncateYear(yearStr) { var year = parseInt(yearStr, 10); if (year <= 49) { return 2000 + year; } else if (year <= 999) { return 1900 + year; } return year; } function preprocessRFC2822(s) { // Remove comments and folding whitespace and replace multiple-spaces with a single space return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); } function checkWeekday(weekdayStr, parsedInput, config) { if (weekdayStr) { // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check. var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay(); if (weekdayProvided !== weekdayActual) { getParsingFlags(config).weekdayMismatch = true; config._isValid = false; return false; } } return true; } var obsOffsets = { UT: 0, GMT: 0, EDT: -4 * 60, EST: -5 * 60, CDT: -5 * 60, CST: -6 * 60, MDT: -6 * 60, MST: -7 * 60, PDT: -7 * 60, PST: -8 * 60 }; function calculateOffset(obsOffset, militaryOffset, numOffset) { if (obsOffset) { return obsOffsets[obsOffset]; } else if (militaryOffset) { // the only allowed military tz is Z return 0; } else { var hm = parseInt(numOffset, 10); var m = hm % 100, h = (hm - m) / 100; return h * 60 + m; } } // date and time from ref 2822 format function configFromRFC2822(config) { var match = rfc2822.exec(preprocessRFC2822(config._i)); if (match) { var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]); if (!checkWeekday(match[1], parsedArray, config)) { return; } config._a = parsedArray; config._tzm = calculateOffset(match[8], match[9], match[10]); config._d = createUTCDate.apply(null, config._a); config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); getParsingFlags(config).rfc2822 = true; } else { config._isValid = false; } } // date from iso format or fallback function configFromString(config) { var matched = aspNetJsonRegex.exec(config._i); if (matched !== null) { config._d = new Date(+matched[1]); return; } configFromISO(config); if (config._isValid === false) { delete config._isValid; } else { return; } configFromRFC2822(config); if (config._isValid === false) { delete config._isValid; } else { return; } // Final attempt, use Input Fallback hooks.createFromInputFallback(config); } hooks.createFromInputFallback = deprecate( 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) { config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); } ); // constant that refers to the ISO standard hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form hooks.RFC_2822 = function () {}; // date from string and format string function configFromStringAndFormat(config) { // TODO: Move this to another part of the creation flow to prevent circular deps if (config._f === hooks.ISO_8601) { configFromISO(config); return; } if (config._f === hooks.RFC_2822) { configFromRFC2822(config); return; } config._a = []; getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC` var string = '' + config._i, i, parsedInput, tokens, token, skipped, stringLength = string.length, totalParsedInputLength = 0; tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; for (i = 0; i < tokens.length; i++) { token = tokens[i]; parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput, // 'regex', getParseRegexForToken(token, config)); if (parsedInput) { skipped = string.substr(0, string.indexOf(parsedInput)); if (skipped.length > 0) { getParsingFlags(config).unusedInput.push(skipped); } string = string.slice(string.indexOf(parsedInput) + parsedInput.length); totalParsedInputLength += parsedInput.length; } // don't parse if it's not a known token if (formatTokenFunctions[token]) { if (parsedInput) { getParsingFlags(config).empty = false; } else { getParsingFlags(config).unusedTokens.push(token); } addTimeToArrayFromToken(token, parsedInput, config); } else if (config._strict && !parsedInput) { getParsingFlags(config).unusedTokens.push(token); } } // add remaining unparsed input length to the string getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; if (string.length > 0) { getParsingFlags(config).unusedInput.push(string); } // clear _12h flag if hour is <= 12 if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) { getParsingFlags(config).bigHour = undefined; } getParsingFlags(config).parsedDateParts = config._a.slice(0); getParsingFlags(config).meridiem = config._meridiem; // handle meridiem config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); configFromArray(config); checkOverflow(config); } function meridiemFixWrap (locale, hour, meridiem) { var isPm; if (meridiem == null) { // nothing to do return hour; } if (locale.meridiemHour != null) { return locale.meridiemHour(hour, meridiem); } else if (locale.isPM != null) { // Fallback isPm = locale.isPM(meridiem); if (isPm && hour < 12) { hour += 12; } if (!isPm && hour === 12) { hour = 0; } return hour; } else { // this is not supposed to happen return hour; } } // date from string and array of format strings function configFromStringAndArray(config) { var tempConfig, bestMoment, scoreToBeat, i, currentScore; if (config._f.length === 0) { getParsingFlags(config).invalidFormat = true; config._d = new Date(NaN); return; } for (i = 0; i < config._f.length; i++) { currentScore = 0; tempConfig = copyConfig({}, config); if (config._useUTC != null) { tempConfig._useUTC = config._useUTC; } tempConfig._f = config._f[i]; configFromStringAndFormat(tempConfig); if (!isValid(tempConfig)) { continue; } // if there is any input that was not parsed add a penalty for that format currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; getParsingFlags(tempConfig).score = currentScore; if (scoreToBeat == null || currentScore < scoreToBeat) { scoreToBeat = currentScore; bestMoment = tempConfig; } } extend(config, bestMoment || tempConfig); } function configFromObject(config) { if (config._d) { return; } var i = normalizeObjectUnits(config._i); config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { return obj && parseInt(obj, 10); }); configFromArray(config); } function createFromConfig (config) { var res = new Moment(checkOverflow(prepareConfig(config))); if (res._nextDay) { // Adding is smart enough around DST res.add(1, 'd'); res._nextDay = undefined; } return res; } function prepareConfig (config) { var input = config._i, format = config._f; config._locale = config._locale || getLocale(config._l); if (input === null || (format === undefined && input === '')) { return createInvalid({nullInput: true}); } if (typeof input === 'string') { config._i = input = config._locale.preparse(input); } if (isMoment(input)) { return new Moment(checkOverflow(input)); } else if (isDate(input)) { config._d = input; } else if (isArray(format)) { configFromStringAndArray(config); } else if (format) { configFromStringAndFormat(config); } else { configFromInput(config); } if (!isValid(config)) { config._d = null; } return config; } function configFromInput(config) { var input = config._i; if (isUndefined(input)) { config._d = new Date(hooks.now()); } else if (isDate(input)) { config._d = new Date(input.valueOf()); } else if (typeof input === 'string') { configFromString(config); } else if (isArray(input)) { config._a = map(input.slice(0), function (obj) { return parseInt(obj, 10); }); configFromArray(config); } else if (isObject(input)) { configFromObject(config); } else if (isNumber(input)) { // from milliseconds config._d = new Date(input); } else { hooks.createFromInputFallback(config); } } function createLocalOrUTC (input, format, locale, strict, isUTC) { var c = {}; if (locale === true || locale === false) { strict = locale; locale = undefined; } if ((isObject(input) && isObjectEmpty(input)) || (isArray(input) && input.length === 0)) { input = undefined; } // object construction must be done this way. // https://github.com/moment/moment/issues/1423 c._isAMomentObject = true; c._useUTC = c._isUTC = isUTC; c._l = locale; c._i = input; c._f = format; c._strict = strict; return createFromConfig(c); } function createLocal (input, format, locale, strict) { return createLocalOrUTC(input, format, locale, strict, false); } var prototypeMin = deprecate( 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () { var other = createLocal.apply(null, arguments); if (this.isValid() && other.isValid()) { return other < this ? this : other; } else { return createInvalid(); } } ); var prototypeMax = deprecate( 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () { var other = createLocal.apply(null, arguments); if (this.isValid() && other.isValid()) { return other > this ? this : other; } else { return createInvalid(); } } ); // Pick a moment m from moments so that m[fn](other) is true for all // other. This relies on the function fn to be transitive. // // moments should either be an array of moment objects or an array, whose // first element is an array of moment objects. function pickBy(fn, moments) { var res, i; if (moments.length === 1 && isArray(moments[0])) { moments = moments[0]; } if (!moments.length) { return createLocal(); } res = moments[0]; for (i = 1; i < moments.length; ++i) { if (!moments[i].isValid() || moments[i][fn](res)) { res = moments[i]; } } return res; } // TODO: Use [].sort instead? function min () { var args = [].slice.call(arguments, 0); return pickBy('isBefore', args); } function max () { var args = [].slice.call(arguments, 0); return pickBy('isAfter', args); } var now = function () { return Date.now ? Date.now() : +(new Date()); }; var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']; function isDurationValid(m) { for (var key in m) { if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) { return false; } } var unitHasDecimal = false; for (var i = 0; i < ordering.length; ++i) { if (m[ordering[i]]) { if (unitHasDecimal) { return false; // only allow non-integers for smallest unit } if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { unitHasDecimal = true; } } } return true; } function isValid$1() { return this._isValid; } function createInvalid$1() { return createDuration(NaN); } function Duration (duration) { var normalizedInput = normalizeObjectUnits(duration), years = normalizedInput.year || 0, quarters = normalizedInput.quarter || 0, months = normalizedInput.month || 0, weeks = normalizedInput.week || normalizedInput.isoWeek || 0, days = normalizedInput.day || 0, hours = normalizedInput.hour || 0, minutes = normalizedInput.minute || 0, seconds = normalizedInput.second || 0, milliseconds = normalizedInput.millisecond || 0; this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove this._milliseconds = +milliseconds + seconds * 1e3 + // 1000 minutes * 6e4 + // 1000 * 60 hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 // Because of dateAddRemove treats 24 hours as different from a // day when working around DST, we need to store them separately this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing // which months you are are talking about, so we have to store // it separately. this._months = +months + quarters * 3 + years * 12; this._data = {}; this._locale = getLocale(); this._bubble(); } function isDuration (obj) { return obj instanceof Duration; } function absRound (number) { if (number < 0) { return Math.round(-1 * number) * -1; } else { return Math.round(number); } } // FORMATTING function offset (token, separator) { addFormatToken(token, 0, 0, function () { var offset = this.utcOffset(); var sign = '+'; if (offset < 0) { offset = -offset; sign = '-'; } return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2); }); } offset('Z', ':'); offset('ZZ', ''); // PARSING addRegexToken('Z', matchShortOffset); addRegexToken('ZZ', matchShortOffset); addParseToken(['Z', 'ZZ'], function (input, array, config) { config._useUTC = true; config._tzm = offsetFromString(matchShortOffset, input); }); // HELPERS // timezone chunker // '+10:00' > ['10', '00'] // '-1530' > ['-15', '30'] var chunkOffset = /([\+\-]|\d\d)/gi; function offsetFromString(matcher, string) { var matches = (string || '').match(matcher); if (matches === null) { return null; } var chunk = matches[matches.length - 1] || []; var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; var minutes = +(parts[1] * 60) + toInt(parts[2]); return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; } // Return a moment from input, that is local/utc/zone equivalent to model. function cloneWithOffset(input, model) { var res, diff; if (model._isUTC) { res = model.clone(); diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api. res._d.setTime(res._d.valueOf() + diff); hooks.updateOffset(res, false); return res; } else { return createLocal(input).local(); } } function getDateOffset (m) { // On Firefox.24 Date#getTimezoneOffset returns a floating point. // https://github.com/moment/moment/pull/1871 return -Math.round(m._d.getTimezoneOffset() / 15) * 15; } // HOOKS // This function will be called whenever a moment is mutated. // It is intended to keep the offset in sync with the timezone. hooks.updateOffset = function () {}; // MOMENTS // keepLocalTime = true means only change the timezone, without // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset // +0200, so we adjust the time as needed, to be valid. // // Keeping the time actually adds/subtracts (one hour) // from the actual represented time. That is why we call updateOffset // a second time. In case it wants us to change the offset again // _changeInProgress == true case, then we have to adjust, because // there is no such time in the given timezone. function getSetOffset (input, keepLocalTime, keepMinutes) { var offset = this._offset || 0, localAdjust; if (!this.isValid()) { return input != null ? this : NaN; } if (input != null) { if (typeof input === 'string') { input = offsetFromString(matchShortOffset, input); if (input === null) { return this; } } else if (Math.abs(input) < 16 && !keepMinutes) { input = input * 60; } if (!this._isUTC && keepLocalTime) { localAdjust = getDateOffset(this); } this._offset = input; this._isUTC = true; if (localAdjust != null) { this.add(localAdjust, 'm'); } if (offset !== input) { if (!keepLocalTime || this._changeInProgress) { addSubtract(this, createDuration(input - offset, 'm'), 1, false); } else if (!this._changeInProgress) { this._changeInProgress = true; hooks.updateOffset(this, true); this._changeInProgress = null; } } return this; } else { return this._isUTC ? offset : getDateOffset(this); } } function getSetZone (input, keepLocalTime) { if (input != null) { if (typeof input !== 'string') { input = -input; } this.utcOffset(input, keepLocalTime); return this; } else { return -this.utcOffset(); } } function setOffsetToUTC (keepLocalTime) { return this.utcOffset(0, keepLocalTime); } function setOffsetToLocal (keepLocalTime) { if (this._isUTC) { this.utcOffset(0, keepLocalTime); this._isUTC = false; if (keepLocalTime) { this.subtract(getDateOffset(this), 'm'); } } return this; } function setOffsetToParsedOffset () { if (this._tzm != null) { this.utcOffset(this._tzm, false, true); } else if (typeof this._i === 'string') { var tZone = offsetFromString(matchOffset, this._i); if (tZone != null) { this.utcOffset(tZone); } else { this.utcOffset(0, true); } } return this; } function hasAlignedHourOffset (input) { if (!this.isValid()) { return false; } input = input ? createLocal(input).utcOffset() : 0; return (this.utcOffset() - input) % 60 === 0; } function isDaylightSavingTime () { return ( this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset() ); } function isDaylightSavingTimeShifted () { if (!isUndefined(this._isDSTShifted)) { return this._isDSTShifted; } var c = {}; copyConfig(c, this); c = prepareConfig(c); if (c._a) { var other = c._isUTC ? createUTC(c._a) : createLocal(c._a); this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0; } else { this._isDSTShifted = false; } return this._isDSTShifted; } function isLocal () { return this.isValid() ? !this._isUTC : false; } function isUtcOffset () { return this.isValid() ? this._isUTC : false; } function isUtc () { return this.isValid() ? this._isUTC && this._offset === 0 : false; } // ASP.NET json date format regex var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere // and further modified to allow for strings containing both week and day var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function createDuration (input, key) { var duration = input, // matching against regexp is expensive, do it on demand match = null, sign, ret, diffRes; if (isDuration(input)) { duration = { ms : input._milliseconds, d : input._days, M : input._months }; } else if (isNumber(input)) { duration = {}; if (key) { duration[key] = input; } else { duration.milliseconds = input; } } else if (!!(match = aspNetRegex.exec(input))) { sign = (match[1] === '-') ? -1 : 1; duration = { y : 0, d : toInt(match[DATE]) * sign, h : toInt(match[HOUR]) * sign, m : toInt(match[MINUTE]) * sign, s : toInt(match[SECOND]) * sign, ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match }; } else if (!!(match = isoRegex.exec(input))) { sign = (match[1] === '-') ? -1 : 1; duration = { y : parseIso(match[2], sign), M : parseIso(match[3], sign), w : parseIso(match[4], sign), d : parseIso(match[5], sign), h : parseIso(match[6], sign), m : parseIso(match[7], sign), s : parseIso(match[8], sign) }; } else if (duration == null) {// checks for null or undefined duration = {}; } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to)); duration = {}; duration.ms = diffRes.milliseconds; duration.M = diffRes.months; } ret = new Duration(duration); if (isDuration(input) && hasOwnProp(input, '_locale')) { ret._locale = input._locale; } return ret; } createDuration.fn = Duration.prototype; createDuration.invalid = createInvalid$1; function parseIso (inp, sign) { // We'd normally use ~~inp for this, but unfortunately it also // converts floats to ints. // inp may be undefined, so careful calling replace on it. var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it return (isNaN(res) ? 0 : res) * sign; } function positiveMomentsDifference(base, other) { var res = {}; res.months = other.month() - base.month() + (other.year() - base.year()) * 12; if (base.clone().add(res.months, 'M').isAfter(other)) { --res.months; } res.milliseconds = +other - +(base.clone().add(res.months, 'M')); return res; } function momentsDifference(base, other) { var res; if (!(base.isValid() && other.isValid())) { return {milliseconds: 0, months: 0}; } other = cloneWithOffset(other, base); if (base.isBefore(other)) { res = positiveMomentsDifference(base, other); } else { res = positiveMomentsDifference(other, base); res.milliseconds = -res.milliseconds; res.months = -res.months; } return res; } // TODO: remove 'name' arg after deprecation is removed function createAdder(direction, name) { return function (val, period) { var dur, tmp; //invert the arguments, but complain about it if (period !== null && !isNaN(+period)) { deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); tmp = val; val = period; period = tmp; } val = typeof val === 'string' ? +val : val; dur = createDuration(val, period); addSubtract(this, dur, direction); return this; }; } function addSubtract (mom, duration, isAdding, updateOffset) { var milliseconds = duration._milliseconds, days = absRound(duration._days), months = absRound(duration._months); if (!mom.isValid()) { // No op return; } updateOffset = updateOffset == null ? true : updateOffset; if (months) { setMonth(mom, get(mom, 'Month') + months * isAdding); } if (days) { set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); } if (milliseconds) { mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); } if (updateOffset) { hooks.updateOffset(mom, days || months); } } var add = createAdder(1, 'add'); var subtract = createAdder(-1, 'subtract'); function getCalendarFormat(myMoment, now) { var diff = myMoment.diff(now, 'days', true); return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse'; } function calendar$1 (time, formats) { // We want to compare the start of today, vs this. // Getting start-of-today depends on whether we're local/utc/offset or not. var now = time || createLocal(), sod = cloneWithOffset(now, this).startOf('day'), format = hooks.calendarFormat(this, sod) || 'sameElse'; var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); return this.format(output || this.localeData().calendar(format, this, createLocal(now))); } function clone () { return new Moment(this); } function isAfter (input, units) { var localInput = isMoment(input) ? input : createLocal(input); if (!(this.isValid() && localInput.isValid())) { return false; } units = normalizeUnits(units) || 'millisecond'; if (units === 'millisecond') { return this.valueOf() > localInput.valueOf(); } else { return localInput.valueOf() < this.clone().startOf(units).valueOf(); } } function isBefore (input, units) { var localInput = isMoment(input) ? input : createLocal(input); if (!(this.isValid() && localInput.isValid())) { return false; } units = normalizeUnits(units) || 'millisecond'; if (units === 'millisecond') { return this.valueOf() < localInput.valueOf(); } else { return this.clone().endOf(units).valueOf() < localInput.valueOf(); } } function isBetween (from, to, units, inclusivity) { var localFrom = isMoment(from) ? from : createLocal(from), localTo = isMoment(to) ? to : createLocal(to); if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { return false; } inclusivity = inclusivity || '()'; return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units)); } function isSame (input, units) { var localInput = isMoment(input) ? input : createLocal(input), inputMs; if (!(this.isValid() && localInput.isValid())) { return false; } units = normalizeUnits(units) || 'millisecond'; if (units === 'millisecond') { return this.valueOf() === localInput.valueOf(); } else { inputMs = localInput.valueOf(); return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); } } function isSameOrAfter (input, units) { return this.isSame(input, units) || this.isAfter(input, units); } function isSameOrBefore (input, units) { return this.isSame(input, units) || this.isBefore(input, units); } function diff (input, units, asFloat) { var that, zoneDelta, output; if (!this.isValid()) { return NaN; } that = cloneWithOffset(input, this); if (!that.isValid()) { return NaN; } zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; units = normalizeUnits(units); switch (units) { case 'year': output = monthDiff(this, that) / 12; break; case 'month': output = monthDiff(this, that); break; case 'quarter': output = monthDiff(this, that) / 3; break; case 'second': output = (this - that) / 1e3; break; // 1000 case 'minute': output = (this - that) / 6e4; break; // 1000 * 60 case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60 case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst default: output = this - that; } return asFloat ? output : absFloor(output); } function monthDiff (a, b) { // difference in months var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()), // b is in (anchor - 1 month, anchor + 1 month) anchor = a.clone().add(wholeMonthDiff, 'months'), anchor2, adjust; if (b - anchor < 0) { anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month adjust = (b - anchor) / (anchor - anchor2); } else { anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month adjust = (b - anchor) / (anchor2 - anchor); } //check for negative zero, return zero if negative zero return -(wholeMonthDiff + adjust) || 0; } hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; function toString () { return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); } function toISOString(keepOffset) { if (!this.isValid()) { return null; } var utc = keepOffset !== true; var m = utc ? this.clone().utc() : this; if (m.year() < 0 || m.year() > 9999) { return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'); } if (isFunction(Date.prototype.toISOString)) { // native implementation is ~50x faster, use it when we can if (utc) { return this.toDate().toISOString(); } else { return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z')); } } return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'); } /** * Return a human readable representation of a moment that can * also be evaluated to get a new moment which is the same * * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects */ function inspect () { if (!this.isValid()) { return 'moment.invalid(/* ' + this._i + ' */)'; } var func = 'moment'; var zone = ''; if (!this.isLocal()) { func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; zone = 'Z'; } var prefix = '[' + func + '("]'; var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY'; var datetime = '-MM-DD[T]HH:mm:ss.SSS'; var suffix = zone + '[")]'; return this.format(prefix + year + datetime + suffix); } function format (inputString) { if (!inputString) { inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; } var output = formatMoment(this, inputString); return this.localeData().postformat(output); } function from (time, withoutSuffix) { if (this.isValid() && ((isMoment(time) && time.isValid()) || createLocal(time).isValid())) { return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); } else { return this.localeData().invalidDate(); } } function fromNow (withoutSuffix) { return this.from(createLocal(), withoutSuffix); } function to (time, withoutSuffix) { if (this.isValid() && ((isMoment(time) && time.isValid()) || createLocal(time).isValid())) { return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix); } else { return this.localeData().invalidDate(); } } function toNow (withoutSuffix) { return this.to(createLocal(), withoutSuffix); } // If passed a locale key, it will set the locale for this // instance. Otherwise, it will return the locale configuration // variables for this instance. function locale (key) { var newLocaleData; if (key === undefined) { return this._locale._abbr; } else { newLocaleData = getLocale(key); if (newLocaleData != null) { this._locale = newLocaleData; } return this; } } var lang = deprecate( 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) { if (key === undefined) { return this.localeData(); } else { return this.locale(key); } } ); function localeData () { return this._locale; } var MS_PER_SECOND = 1000; var MS_PER_MINUTE = 60 * MS_PER_SECOND; var MS_PER_HOUR = 60 * MS_PER_MINUTE; var MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; // actual modulo - handles negative numbers (for dates before 1970): function mod$1(dividend, divisor) { return (dividend % divisor + divisor) % divisor; } function localStartOfDate(y, m, d) { // the date constructor remaps years 0-99 to 1900-1999 if (y < 100 && y >= 0) { // preserve leap years using a full 400 year cycle, then reset return new Date(y + 400, m, d) - MS_PER_400_YEARS; } else { return new Date(y, m, d).valueOf(); } } function utcStartOfDate(y, m, d) { // Date.UTC remaps years 0-99 to 1900-1999 if (y < 100 && y >= 0) { // preserve leap years using a full 400 year cycle, then reset return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; } else { return Date.UTC(y, m, d); } } function startOf (units) { var time; units = normalizeUnits(units); if (units === undefined || units === 'millisecond' || !this.isValid()) { return this; } var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; switch (units) { case 'year': time = startOfDate(this.year(), 0, 1); break; case 'quarter': time = startOfDate(this.year(), this.month() - this.month() % 3, 1); break; case 'month': time = startOfDate(this.year(), this.month(), 1); break; case 'week': time = startOfDate(this.year(), this.month(), this.date() - this.weekday()); break; case 'isoWeek': time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1)); break; case 'day': case 'date': time = startOfDate(this.year(), this.month(), this.date()); break; case 'hour': time = this._d.valueOf(); time -= mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR); break; case 'minute': time = this._d.valueOf(); time -= mod$1(time, MS_PER_MINUTE); break; case 'second': time = this._d.valueOf(); time -= mod$1(time, MS_PER_SECOND); break; } this._d.setTime(time); hooks.updateOffset(this, true); return this; } function endOf (units) { var time; units = normalizeUnits(units); if (units === undefined || units === 'millisecond' || !this.isValid()) { return this; } var startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; switch (units) { case 'year': time = startOfDate(this.year() + 1, 0, 1) - 1; break; case 'quarter': time = startOfDate(this.year(), this.month() - this.month() % 3 + 3, 1) - 1; break; case 'month': time = startOfDate(this.year(), this.month() + 1, 1) - 1; break; case 'week': time = startOfDate(this.year(), this.month(), this.date() - this.weekday() + 7) - 1; break; case 'isoWeek': time = startOfDate(this.year(), this.month(), this.date() - (this.isoWeekday() - 1) + 7) - 1; break; case 'day': case 'date': time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; break; case 'hour': time = this._d.valueOf(); time += MS_PER_HOUR - mod$1(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1; break; case 'minute': time = this._d.valueOf(); time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; break; case 'second': time = this._d.valueOf(); time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; break; } this._d.setTime(time); hooks.updateOffset(this, true); return this; } function valueOf () { return this._d.valueOf() - ((this._offset || 0) * 60000); } function unix () { return Math.floor(this.valueOf() / 1000); } function toDate () { return new Date(this.valueOf()); } function toArray () { var m = this; return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; } function toObject () { var m = this; return { years: m.year(), months: m.month(), date: m.date(), hours: m.hours(), minutes: m.minutes(), seconds: m.seconds(), milliseconds: m.milliseconds() }; } function toJSON () { // new Date(NaN).toJSON() === null return this.isValid() ? this.toISOString() : null; } function isValid$2 () { return isValid(this); } function parsingFlags () { return extend({}, getParsingFlags(this)); } function invalidAt () { return getParsingFlags(this).overflow; } function creationData() { return { input: this._i, format: this._f, locale: this._locale, isUTC: this._isUTC, strict: this._strict }; } // FORMATTING addFormatToken(0, ['gg', 2], 0, function () { return this.weekYear() % 100; }); addFormatToken(0, ['GG', 2], 0, function () { return this.isoWeekYear() % 100; }); function addWeekYearFormatToken (token, getter) { addFormatToken(0, [token, token.length], 0, getter); } addWeekYearFormatToken('gggg', 'weekYear'); addWeekYearFormatToken('ggggg', 'weekYear'); addWeekYearFormatToken('GGGG', 'isoWeekYear'); addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES addUnitAlias('weekYear', 'gg'); addUnitAlias('isoWeekYear', 'GG'); // PRIORITY addUnitPriority('weekYear', 1); addUnitPriority('isoWeekYear', 1); // PARSING addRegexToken('G', matchSigned); addRegexToken('g', matchSigned); addRegexToken('GG', match1to2, match2); addRegexToken('gg', match1to2, match2); addRegexToken('GGGG', match1to4, match4); addRegexToken('gggg', match1to4, match4); addRegexToken('GGGGG', match1to6, match6); addRegexToken('ggggg', match1to6, match6); addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { week[token.substr(0, 2)] = toInt(input); }); addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { week[token] = hooks.parseTwoDigitYear(input); }); // MOMENTS function getSetWeekYear (input) { return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy); } function getSetISOWeekYear (input) { return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4); } function getISOWeeksInYear () { return weeksInYear(this.year(), 1, 4); } function getWeeksInYear () { var weekInfo = this.localeData()._week; return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); } function getSetWeekYearHelper(input, week, weekday, dow, doy) { var weeksTarget; if (input == null) { return weekOfYear(this, dow, doy).year; } else { weeksTarget = weeksInYear(input, dow, doy); if (week > weeksTarget) { week = weeksTarget; } return setWeekAll.call(this, input, week, weekday, dow, doy); } } function setWeekAll(weekYear, week, weekday, dow, doy) { var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); this.year(date.getUTCFullYear()); this.month(date.getUTCMonth()); this.date(date.getUTCDate()); return this; } // FORMATTING addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES addUnitAlias('quarter', 'Q'); // PRIORITY addUnitPriority('quarter', 7); // PARSING addRegexToken('Q', match1); addParseToken('Q', function (input, array) { array[MONTH] = (toInt(input) - 1) * 3; }); // MOMENTS function getSetQuarter (input) { return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); } // FORMATTING addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES addUnitAlias('date', 'D'); // PRIORITY addUnitPriority('date', 9); // PARSING addRegexToken('D', match1to2); addRegexToken('DD', match1to2, match2); addRegexToken('Do', function (isStrict, locale) { // TODO: Remove "ordinalParse" fallback in next major release. return isStrict ? (locale._dayOfMonthOrdinalParse || locale._ordinalParse) : locale._dayOfMonthOrdinalParseLenient; }); addParseToken(['D', 'DD'], DATE); addParseToken('Do', function (input, array) { array[DATE] = toInt(input.match(match1to2)[0]); }); // MOMENTS var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES addUnitAlias('dayOfYear', 'DDD'); // PRIORITY addUnitPriority('dayOfYear', 4); // PARSING addRegexToken('DDD', match1to3); addRegexToken('DDDD', match3); addParseToken(['DDD', 'DDDD'], function (input, array, config) { config._dayOfYear = toInt(input); }); // HELPERS // MOMENTS function getSetDayOfYear (input) { var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); } // FORMATTING addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES addUnitAlias('minute', 'm'); // PRIORITY addUnitPriority('minute', 14); // PARSING addRegexToken('m', match1to2); addRegexToken('mm', match1to2, match2); addParseToken(['m', 'mm'], MINUTE); // MOMENTS var getSetMinute = makeGetSet('Minutes', false); // FORMATTING addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES addUnitAlias('second', 's'); // PRIORITY addUnitPriority('second', 15); // PARSING addRegexToken('s', match1to2); addRegexToken('ss', match1to2, match2); addParseToken(['s', 'ss'], SECOND); // MOMENTS var getSetSecond = makeGetSet('Seconds', false); // FORMATTING addFormatToken('S', 0, 0, function () { return ~~(this.millisecond() / 100); }); addFormatToken(0, ['SS', 2], 0, function () { return ~~(this.millisecond() / 10); }); addFormatToken(0, ['SSS', 3], 0, 'millisecond'); addFormatToken(0, ['SSSS', 4], 0, function () { return this.millisecond() * 10; }); addFormatToken(0, ['SSSSS', 5], 0, function () { return this.millisecond() * 100; }); addFormatToken(0, ['SSSSSS', 6], 0, function () { return this.millisecond() * 1000; }); addFormatToken(0, ['SSSSSSS', 7], 0, function () { return this.millisecond() * 10000; }); addFormatToken(0, ['SSSSSSSS', 8], 0, function () { return this.millisecond() * 100000; }); addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { return this.millisecond() * 1000000; }); // ALIASES addUnitAlias('millisecond', 'ms'); // PRIORITY addUnitPriority('millisecond', 16); // PARSING addRegexToken('S', match1to3, match1); addRegexToken('SS', match1to3, match2); addRegexToken('SSS', match1to3, match3); var token; for (token = 'SSSS'; token.length <= 9; token += 'S') { addRegexToken(token, matchUnsigned); } function parseMs(input, array) { array[MILLISECOND] = toInt(('0.' + input) * 1000); } for (token = 'S'; token.length <= 9; token += 'S') { addParseToken(token, parseMs); } // MOMENTS var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING addFormatToken('z', 0, 0, 'zoneAbbr'); addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS function getZoneAbbr () { return this._isUTC ? 'UTC' : ''; } function getZoneName () { return this._isUTC ? 'Coordinated Universal Time' : ''; } var proto = Moment.prototype; proto.add = add; proto.calendar = calendar$1; proto.clone = clone; proto.diff = diff; proto.endOf = endOf; proto.format = format; proto.from = from; proto.fromNow = fromNow; proto.to = to; proto.toNow = toNow; proto.get = stringGet; proto.invalidAt = invalidAt; proto.isAfter = isAfter; proto.isBefore = isBefore; proto.isBetween = isBetween; proto.isSame = isSame; proto.isSameOrAfter = isSameOrAfter; proto.isSameOrBefore = isSameOrBefore; proto.isValid = isValid$2; proto.lang = lang; proto.locale = locale; proto.localeData = localeData; proto.max = prototypeMax; proto.min = prototypeMin; proto.parsingFlags = parsingFlags; proto.set = stringSet; proto.startOf = startOf; proto.subtract = subtract; proto.toArray = toArray; proto.toObject = toObject; proto.toDate = toDate; proto.toISOString = toISOString; proto.inspect = inspect; proto.toJSON = toJSON; proto.toString = toString; proto.unix = unix; proto.valueOf = valueOf; proto.creationData = creationData; proto.year = getSetYear; proto.isLeapYear = getIsLeapYear; proto.weekYear = getSetWeekYear; proto.isoWeekYear = getSetISOWeekYear; proto.quarter = proto.quarters = getSetQuarter; proto.month = getSetMonth; proto.daysInMonth = getDaysInMonth; proto.week = proto.weeks = getSetWeek; proto.isoWeek = proto.isoWeeks = getSetISOWeek; proto.weeksInYear = getWeeksInYear; proto.isoWeeksInYear = getISOWeeksInYear; proto.date = getSetDayOfMonth; proto.day = proto.days = getSetDayOfWeek; proto.weekday = getSetLocaleDayOfWeek; proto.isoWeekday = getSetISODayOfWeek; proto.dayOfYear = getSetDayOfYear; proto.hour = proto.hours = getSetHour; proto.minute = proto.minutes = getSetMinute; proto.second = proto.seconds = getSetSecond; proto.millisecond = proto.milliseconds = getSetMillisecond; proto.utcOffset = getSetOffset; proto.utc = setOffsetToUTC; proto.local = setOffsetToLocal; proto.parseZone = setOffsetToParsedOffset; proto.hasAlignedHourOffset = hasAlignedHourOffset; proto.isDST = isDaylightSavingTime; proto.isLocal = isLocal; proto.isUtcOffset = isUtcOffset; proto.isUtc = isUtc; proto.isUTC = isUtc; proto.zoneAbbr = getZoneAbbr; proto.zoneName = getZoneName; proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); function createUnix (input) { return createLocal(input * 1000); } function createInZone () { return createLocal.apply(null, arguments).parseZone(); } function preParsePostFormat (string) { return string; } var proto$1 = Locale.prototype; proto$1.calendar = calendar; proto$1.longDateFormat = longDateFormat; proto$1.invalidDate = invalidDate; proto$1.ordinal = ordinal; proto$1.preparse = preParsePostFormat; proto$1.postformat = preParsePostFormat; proto$1.relativeTime = relativeTime; proto$1.pastFuture = pastFuture; proto$1.set = set; proto$1.months = localeMonths; proto$1.monthsShort = localeMonthsShort; proto$1.monthsParse = localeMonthsParse; proto$1.monthsRegex = monthsRegex; proto$1.monthsShortRegex = monthsShortRegex; proto$1.week = localeWeek; proto$1.firstDayOfYear = localeFirstDayOfYear; proto$1.firstDayOfWeek = localeFirstDayOfWeek; proto$1.weekdays = localeWeekdays; proto$1.weekdaysMin = localeWeekdaysMin; proto$1.weekdaysShort = localeWeekdaysShort; proto$1.weekdaysParse = localeWeekdaysParse; proto$1.weekdaysRegex = weekdaysRegex; proto$1.weekdaysShortRegex = weekdaysShortRegex; proto$1.weekdaysMinRegex = weekdaysMinRegex; proto$1.isPM = localeIsPM; proto$1.meridiem = localeMeridiem; function get$1 (format, index, field, setter) { var locale = getLocale(); var utc = createUTC().set(setter, index); return locale[field](utc, format); } function listMonthsImpl (format, index, field) { if (isNumber(format)) { index = format; format = undefined; } format = format || ''; if (index != null) { return get$1(format, index, field, 'month'); } var i; var out = []; for (i = 0; i < 12; i++) { out[i] = get$1(format, i, field, 'month'); } return out; } // () // (5) // (fmt, 5) // (fmt) // (true) // (true, 5) // (true, fmt, 5) // (true, fmt) function listWeekdaysImpl (localeSorted, format, index, field) { if (typeof localeSorted === 'boolean') { if (isNumber(format)) { index = format; format = undefined; } format = format || ''; } else { format = localeSorted; index = format; localeSorted = false; if (isNumber(format)) { index = format; format = undefined; } format = format || ''; } var locale = getLocale(), shift = localeSorted ? locale._week.dow : 0; if (index != null) { return get$1(format, (index + shift) % 7, field, 'day'); } var i; var out = []; for (i = 0; i < 7; i++) { out[i] = get$1(format, (i + shift) % 7, field, 'day'); } return out; } function listMonths (format, index) { return listMonthsImpl(format, index, 'months'); } function listMonthsShort (format, index) { return listMonthsImpl(format, index, 'monthsShort'); } function listWeekdays (localeSorted, format, index) { return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); } function listWeekdaysShort (localeSorted, format, index) { return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); } function listWeekdaysMin (localeSorted, format, index) { return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); } getSetGlobalLocale('en', { dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, ordinal : function (number) { var b = number % 10, output = (toInt(number % 100 / 10) === 1) ? 'th' : (b === 1) ? 'st' : (b === 2) ? 'nd' : (b === 3) ? 'rd' : 'th'; return number + output; } }); // Side effect imports hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale); hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale); var mathAbs = Math.abs; function abs () { var data = this._data; this._milliseconds = mathAbs(this._milliseconds); this._days = mathAbs(this._days); this._months = mathAbs(this._months); data.milliseconds = mathAbs(data.milliseconds); data.seconds = mathAbs(data.seconds); data.minutes = mathAbs(data.minutes); data.hours = mathAbs(data.hours); data.months = mathAbs(data.months); data.years = mathAbs(data.years); return this; } function addSubtract$1 (duration, input, value, direction) { var other = createDuration(input, value); duration._milliseconds += direction * other._milliseconds; duration._days += direction * other._days; duration._months += direction * other._months; return duration._bubble(); } // supports only 2.0-style add(1, 's') or add(duration) function add$1 (input, value) { return addSubtract$1(this, input, value, 1); } // supports only 2.0-style subtract(1, 's') or subtract(duration) function subtract$1 (input, value) { return addSubtract$1(this, input, value, -1); } function absCeil (number) { if (number < 0) { return Math.floor(number); } else { return Math.ceil(number); } } function bubble () { var milliseconds = this._milliseconds; var days = this._days; var months = this._months; var data = this._data; var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first // check: https://github.com/moment/moment/issues/2166 if (!((milliseconds >= 0 && days >= 0 && months >= 0) || (milliseconds <= 0 && days <= 0 && months <= 0))) { milliseconds += absCeil(monthsToDays(months) + days) * 864e5; days = 0; months = 0; } // The following code bubbles up values, see the tests for // examples of what that means. data.milliseconds = milliseconds % 1000; seconds = absFloor(milliseconds / 1000); data.seconds = seconds % 60; minutes = absFloor(seconds / 60); data.minutes = minutes % 60; hours = absFloor(minutes / 60); data.hours = hours % 24; days += absFloor(hours / 24); // convert days to months monthsFromDays = absFloor(daysToMonths(days)); months += monthsFromDays; days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year years = absFloor(months / 12); months %= 12; data.days = days; data.months = months; data.years = years; return this; } function daysToMonths (days) { // 400 years have 146097 days (taking into account leap year rules) // 400 years have 12 months === 4800 return days * 4800 / 146097; } function monthsToDays (months) { // the reverse of daysToMonths return months * 146097 / 4800; } function as (units) { if (!this.isValid()) { return NaN; } var days; var months; var milliseconds = this._milliseconds; units = normalizeUnits(units); if (units === 'month' || units === 'quarter' || units === 'year') { days = this._days + milliseconds / 864e5; months = this._months + daysToMonths(days); switch (units) { case 'month': return months; case 'quarter': return months / 3; case 'year': return months / 12; } } else { // handle milliseconds separately because of floating point math errors (issue #1867) days = this._days + Math.round(monthsToDays(this._months)); switch (units) { case 'week' : return days / 7 + milliseconds / 6048e5; case 'day' : return days + milliseconds / 864e5; case 'hour' : return days * 24 + milliseconds / 36e5; case 'minute' : return days * 1440 + milliseconds / 6e4; case 'second' : return days * 86400 + milliseconds / 1000; // Math.floor prevents floating point math errors here case 'millisecond': return Math.floor(days * 864e5) + milliseconds; default: throw new Error('Unknown unit ' + units); } } } // TODO: Use this.as('ms')? function valueOf$1 () { if (!this.isValid()) { return NaN; } return ( this._milliseconds + this._days * 864e5 + (this._months % 12) * 2592e6 + toInt(this._months / 12) * 31536e6 ); } function makeAs (alias) { return function () { return this.as(alias); }; } var asMilliseconds = makeAs('ms'); var asSeconds = makeAs('s'); var asMinutes = makeAs('m'); var asHours = makeAs('h'); var asDays = makeAs('d'); var asWeeks = makeAs('w'); var asMonths = makeAs('M'); var asQuarters = makeAs('Q'); var asYears = makeAs('y'); function clone$1 () { return createDuration(this); } function get$2 (units) { units = normalizeUnits(units); return this.isValid() ? this[units + 's']() : NaN; } function makeGetter(name) { return function () { return this.isValid() ? this._data[name] : NaN; }; } var milliseconds = makeGetter('milliseconds'); var seconds = makeGetter('seconds'); var minutes = makeGetter('minutes'); var hours = makeGetter('hours'); var days = makeGetter('days'); var months = makeGetter('months'); var years = makeGetter('years'); function weeks () { return absFloor(this.days() / 7); } var round = Math.round; var thresholds = { ss: 44, // a few seconds to seconds s : 45, // seconds to minute m : 45, // minutes to hour h : 22, // hours to day d : 26, // days to month M : 11 // months to year }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); } function relativeTime$1 (posNegDuration, withoutSuffix, locale) { var duration = createDuration(posNegDuration).abs(); var seconds = round(duration.as('s')); var minutes = round(duration.as('m')); var hours = round(duration.as('h')); var days = round(duration.as('d')); var months = round(duration.as('M')); var years = round(duration.as('y')); var a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years]; a[2] = withoutSuffix; a[3] = +posNegDuration > 0; a[4] = locale; return substituteTimeAgo.apply(null, a); } // This function allows you to set the rounding function for relative time strings function getSetRelativeTimeRounding (roundingFunction) { if (roundingFunction === undefined) { return round; } if (typeof(roundingFunction) === 'function') { round = roundingFunction; return true; } return false; } // This function allows you to set a threshold for relative time strings function getSetRelativeTimeThreshold (threshold, limit) { if (thresholds[threshold] === undefined) { return false; } if (limit === undefined) { return thresholds[threshold]; } thresholds[threshold] = limit; if (threshold === 's') { thresholds.ss = limit - 1; } return true; } function humanize (withSuffix) { if (!this.isValid()) { return this.localeData().invalidDate(); } var locale = this.localeData(); var output = relativeTime$1(this, !withSuffix, locale); if (withSuffix) { output = locale.pastFuture(+this, output); } return locale.postformat(output); } var abs$1 = Math.abs; function sign(x) { return ((x > 0) - (x < 0)) || +x; } function toISOString$1() { // for ISO strings we do not use the normal bubbling rules: // * milliseconds bubble up until they become hours // * days do not bubble at all // * months bubble up until they become years // This is because there is no context-free conversion between hours and days // (think of clock changes) // and also not between days and months (28-31 days per month) if (!this.isValid()) { return this.localeData().invalidDate(); } var seconds = abs$1(this._milliseconds) / 1000; var days = abs$1(this._days); var months = abs$1(this._months); var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour minutes = absFloor(seconds / 60); hours = absFloor(minutes / 60); seconds %= 60; minutes %= 60; // 12 months -> 1 year years = absFloor(months / 12); months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js var Y = years; var M = months; var D = days; var h = hours; var m = minutes; var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; var total = this.asSeconds(); if (!total) { // this is the same as C#'s (Noda) and python (isodate)... // but not other JS (goog.date) return 'P0D'; } var totalSign = total < 0 ? '-' : ''; var ymSign = sign(this._months) !== sign(total) ? '-' : ''; var daysSign = sign(this._days) !== sign(total) ? '-' : ''; var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; return totalSign + 'P' + (Y ? ymSign + Y + 'Y' : '') + (M ? ymSign + M + 'M' : '') + (D ? daysSign + D + 'D' : '') + ((h || m || s) ? 'T' : '') + (h ? hmsSign + h + 'H' : '') + (m ? hmsSign + m + 'M' : '') + (s ? hmsSign + s + 'S' : ''); } var proto$2 = Duration.prototype; proto$2.isValid = isValid$1; proto$2.abs = abs; proto$2.add = add$1; proto$2.subtract = subtract$1; proto$2.as = as; proto$2.asMilliseconds = asMilliseconds; proto$2.asSeconds = asSeconds; proto$2.asMinutes = asMinutes; proto$2.asHours = asHours; proto$2.asDays = asDays; proto$2.asWeeks = asWeeks; proto$2.asMonths = asMonths; proto$2.asQuarters = asQuarters; proto$2.asYears = asYears; proto$2.valueOf = valueOf$1; proto$2._bubble = bubble; proto$2.clone = clone$1; proto$2.get = get$2; proto$2.milliseconds = milliseconds; proto$2.seconds = seconds; proto$2.minutes = minutes; proto$2.hours = hours; proto$2.days = days; proto$2.weeks = weeks; proto$2.months = months; proto$2.years = years; proto$2.humanize = humanize; proto$2.toISOString = toISOString$1; proto$2.toString = toISOString$1; proto$2.toJSON = toISOString$1; proto$2.locale = locale; proto$2.localeData = localeData; proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1); proto$2.lang = lang; // Side effect imports // FORMATTING addFormatToken('X', 0, 0, 'unix'); addFormatToken('x', 0, 0, 'valueOf'); // PARSING addRegexToken('x', matchSigned); addRegexToken('X', matchTimestamp); addParseToken('X', function (input, array, config) { config._d = new Date(parseFloat(input, 10) * 1000); }); addParseToken('x', function (input, array, config) { config._d = new Date(toInt(input)); }); // Side effect imports hooks.version = '2.24.0'; setHookCallback(createLocal); hooks.fn = proto; hooks.min = min; hooks.max = max; hooks.now = now; hooks.utc = createUTC; hooks.unix = createUnix; hooks.months = listMonths; hooks.isDate = isDate; hooks.locale = getSetGlobalLocale; hooks.invalid = createInvalid; hooks.duration = createDuration; hooks.isMoment = isMoment; hooks.weekdays = listWeekdays; hooks.parseZone = createInZone; hooks.localeData = getLocale; hooks.isDuration = isDuration; hooks.monthsShort = listMonthsShort; hooks.weekdaysMin = listWeekdaysMin; hooks.defineLocale = defineLocale; hooks.updateLocale = updateLocale; hooks.locales = listLocales; hooks.weekdaysShort = listWeekdaysShort; hooks.normalizeUnits = normalizeUnits; hooks.relativeTimeRounding = getSetRelativeTimeRounding; hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; hooks.calendarFormat = getCalendarFormat; hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats hooks.HTML5_FMT = { DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // DATE: 'YYYY-MM-DD', // TIME: 'HH:mm', // TIME_SECONDS: 'HH:mm:ss', // TIME_MS: 'HH:mm:ss.SSS', // WEEK: 'GGGG-[W]WW', // MONTH: 'YYYY-MM' // }; return hooks; }))); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(326)(module))) /***/ }), /* 71 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.tupleNum = exports.tuple = void 0; // https://stackoverflow.com/questions/46176165/ways-to-get-string-literal-type-of-array-values-without-enum-overhead var tuple = function tuple() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return args; }; exports.tuple = tuple; var tupleNum = function tupleNum() { for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } return args; }; exports.tupleNum = tupleNum; //# sourceMappingURL=type.js.map /***/ }), /* 72 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var PropTypes = _interopRequireWildcard(__webpack_require__(1)); var _default = _interopRequireDefault(__webpack_require__(421)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var LocaleReceiver = /*#__PURE__*/ function (_React$Component) { _inherits(LocaleReceiver, _React$Component); function LocaleReceiver() { _classCallCheck(this, LocaleReceiver); return _possibleConstructorReturn(this, _getPrototypeOf(LocaleReceiver).apply(this, arguments)); } _createClass(LocaleReceiver, [{ key: "getLocale", value: function getLocale() { var _this$props = this.props, componentName = _this$props.componentName, defaultLocale = _this$props.defaultLocale; var locale = defaultLocale || _default["default"][componentName || 'global']; var antLocale = this.context.antLocale; var localeFromContext = componentName && antLocale ? antLocale[componentName] : {}; return _extends(_extends({}, typeof locale === 'function' ? locale() : locale), localeFromContext || {}); } }, { key: "getLocaleCode", value: function getLocaleCode() { var antLocale = this.context.antLocale; var localeCode = antLocale && antLocale.locale; // Had use LocaleProvide but didn't set locale if (antLocale && antLocale.exist && !localeCode) { return _default["default"].locale; } return localeCode; } }, { key: "render", value: function render() { return this.props.children(this.getLocale(), this.getLocaleCode(), this.context.antLocale); } }]); return LocaleReceiver; }(React.Component); exports["default"] = LocaleReceiver; LocaleReceiver.defaultProps = { componentName: 'global' }; LocaleReceiver.contextTypes = { antLocale: PropTypes.object }; //# sourceMappingURL=LocaleReceiver.js.map /***/ }), /* 73 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = function (obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }; /***/ }), /* 74 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _button = _interopRequireDefault(__webpack_require__(643)); var _buttonGroup = _interopRequireDefault(__webpack_require__(645)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } _button["default"].Group = _buttonGroup["default"]; var _default = _button["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 75 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(31); __webpack_require__(781); //# sourceMappingURL=css.js.map /***/ }), /* 76 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var PropTypes = _interopRequireWildcard(__webpack_require__(1)); var _classnames = _interopRequireDefault(__webpack_require__(3)); var _omit = _interopRequireDefault(__webpack_require__(46)); var _debounce = _interopRequireDefault(__webpack_require__(374)); var _configProvider = __webpack_require__(14); var _type = __webpack_require__(71); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var __rest = void 0 && (void 0).__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var SpinSizes = (0, _type.tuple)('small', 'default', 'large'); // Render indicator var defaultIndicator = null; function renderIndicator(prefixCls, props) { var indicator = props.indicator; var dotClassName = "".concat(prefixCls, "-dot"); // should not be render default indicator when indicator value is null if (indicator === null) { return null; } if (React.isValidElement(indicator)) { return React.cloneElement(indicator, { className: (0, _classnames["default"])(indicator.props.className, dotClassName) }); } if (React.isValidElement(defaultIndicator)) { return React.cloneElement(defaultIndicator, { className: (0, _classnames["default"])(defaultIndicator.props.className, dotClassName) }); } return React.createElement("span", { className: (0, _classnames["default"])(dotClassName, "".concat(prefixCls, "-dot-spin")) }, React.createElement("i", { className: "".concat(prefixCls, "-dot-item") }), React.createElement("i", { className: "".concat(prefixCls, "-dot-item") }), React.createElement("i", { className: "".concat(prefixCls, "-dot-item") }), React.createElement("i", { className: "".concat(prefixCls, "-dot-item") })); } function shouldDelay(spinning, delay) { return !!spinning && !!delay && !isNaN(Number(delay)); } var Spin = /*#__PURE__*/ function (_React$Component) { _inherits(Spin, _React$Component); function Spin(props) { var _this; _classCallCheck(this, Spin); _this = _possibleConstructorReturn(this, _getPrototypeOf(Spin).call(this, props)); _this.debouncifyUpdateSpinning = function (props) { var _ref = props || _this.props, delay = _ref.delay; if (delay) { _this.cancelExistingSpin(); _this.updateSpinning = (0, _debounce["default"])(_this.originalUpdateSpinning, delay); } }; _this.updateSpinning = function () { var spinning = _this.props.spinning; var currentSpinning = _this.state.spinning; if (currentSpinning !== spinning) { _this.setState({ spinning: spinning }); } }; _this.renderSpin = function (_ref2) { var _classNames; var getPrefixCls = _ref2.getPrefixCls; var _a = _this.props, customizePrefixCls = _a.prefixCls, className = _a.className, size = _a.size, tip = _a.tip, wrapperClassName = _a.wrapperClassName, style = _a.style, restProps = __rest(_a, ["prefixCls", "className", "size", "tip", "wrapperClassName", "style"]); var spinning = _this.state.spinning; var prefixCls = getPrefixCls('spin', customizePrefixCls); var spinClassName = (0, _classnames["default"])(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-sm"), size === 'small'), _defineProperty(_classNames, "".concat(prefixCls, "-lg"), size === 'large'), _defineProperty(_classNames, "".concat(prefixCls, "-spinning"), spinning), _defineProperty(_classNames, "".concat(prefixCls, "-show-text"), !!tip), _classNames), className); // fix https://fb.me/react-unknown-prop var divProps = (0, _omit["default"])(restProps, ['spinning', 'delay', 'indicator']); var spinElement = React.createElement("div", _extends({}, divProps, { style: style, className: spinClassName }), renderIndicator(prefixCls, _this.props), tip ? React.createElement("div", { className: "".concat(prefixCls, "-text") }, tip) : null); if (_this.isNestedPattern()) { var containerClassName = (0, _classnames["default"])("".concat(prefixCls, "-container"), _defineProperty({}, "".concat(prefixCls, "-blur"), spinning)); return React.createElement("div", _extends({}, divProps, { className: (0, _classnames["default"])("".concat(prefixCls, "-nested-loading"), wrapperClassName) }), spinning && React.createElement("div", { key: "loading" }, spinElement), React.createElement("div", { className: containerClassName, key: "container" }, _this.props.children)); } return spinElement; }; var spinning = props.spinning, delay = props.delay; var shouldBeDelayed = shouldDelay(spinning, delay); _this.state = { spinning: spinning && !shouldBeDelayed }; _this.originalUpdateSpinning = _this.updateSpinning; _this.debouncifyUpdateSpinning(props); return _this; } _createClass(Spin, [{ key: "componentDidMount", value: function componentDidMount() { this.updateSpinning(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { this.debouncifyUpdateSpinning(); this.updateSpinning(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.cancelExistingSpin(); } }, { key: "cancelExistingSpin", value: function cancelExistingSpin() { var updateSpinning = this.updateSpinning; if (updateSpinning && updateSpinning.cancel) { updateSpinning.cancel(); } } }, { key: "isNestedPattern", value: function isNestedPattern() { return !!(this.props && this.props.children); } }, { key: "render", value: function render() { return React.createElement(_configProvider.ConfigConsumer, null, this.renderSpin); } }], [{ key: "setDefaultIndicator", value: function setDefaultIndicator(indicator) { defaultIndicator = indicator; } }]); return Spin; }(React.Component); Spin.defaultProps = { spinning: true, size: 'default', wrapperClassName: '' }; Spin.propTypes = { prefixCls: PropTypes.string, className: PropTypes.string, spinning: PropTypes.bool, size: PropTypes.oneOf(SpinSizes), wrapperClassName: PropTypes.string, indicator: PropTypes.element }; var _default = Spin; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 77 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__MemoryRouter__ = __webpack_require__(217); /* unused harmony reexport MemoryRouter */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Prompt__ = __webpack_require__(220); /* unused harmony reexport Prompt */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Redirect__ = __webpack_require__(221); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_2__Redirect__["a"]; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__Route__ = __webpack_require__(134); /* unused harmony reexport Route */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Router__ = __webpack_require__(98); /* unused harmony reexport Router */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__StaticRouter__ = __webpack_require__(222); /* unused harmony reexport StaticRouter */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__Switch__ = __webpack_require__(223); /* unused harmony reexport Switch */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__generatePath__ = __webpack_require__(135); /* unused harmony reexport generatePath */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__matchPath__ = __webpack_require__(99); /* unused harmony reexport matchPath */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__withRouter__ = __webpack_require__(224); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return __WEBPACK_IMPORTED_MODULE_9__withRouter__["a"]; }); /***/ }), /* 78 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(2); Object.defineProperty(exports, "__esModule", { value: true }); exports.capitalize = capitalize; exports.contains = contains; exports.findIndex = findIndex; exports.find = find; exports.createChainedFunction = createChainedFunction; var _typeof2 = _interopRequireDefault(__webpack_require__(252)); var _keys = _interopRequireDefault(__webpack_require__(49)); var _warning = _interopRequireDefault(__webpack_require__(15)); // weak function capitalize(string) { if (false) { throw new Error('Material-UI: capitalize(string) expects a string argument.'); } return string.charAt(0).toUpperCase() + string.slice(1); } function contains(obj, pred) { return (0, _keys.default)(pred).every(function (key) { return obj.hasOwnProperty(key) && obj[key] === pred[key]; }); } function findIndex(arr, pred) { var predType = (0, _typeof2.default)(pred); for (var i = 0; i < arr.length; i += 1) { if (predType === 'function' && !!pred(arr[i], i, arr) === true) { return i; } if (predType === 'object' && contains(arr[i], pred)) { return i; } if (['string', 'number', 'boolean'].indexOf(predType) !== -1) { return arr.indexOf(pred); } } return -1; } function find(arr, pred) { var index = findIndex(arr, pred); return index > -1 ? arr[index] : undefined; } /** * Safe chained function * * Will only create a new function if needed, * otherwise will pass back existing functions or null. * * @param {function} functions to chain * @returns {function|null} */ function createChainedFunction() { for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { funcs[_key] = arguments[_key]; } return funcs.filter(function (func) { return func != null; }).reduce(function (acc, func) { false ? (0, _warning.default)(typeof func === 'function', 'Material-UI: invalid Argument Type, must only provide functions, undefined, or null.') : void 0; return function chainedFunction() { for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } acc.apply(this, args); func.apply(this, args); }; }, function () {}); } /***/ }), /* 79 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(829); /***/ }), /* 80 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__(236); var enumBugKeys = __webpack_require__(144); module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); }; /***/ }), /* 81 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(2); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.isNumber = exports.isString = exports.formatMs = exports.duration = exports.easing = void 0; var _keys = _interopRequireDefault(__webpack_require__(49)); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(6)); var _isNan = _interopRequireDefault(__webpack_require__(578)); var _warning = _interopRequireDefault(__webpack_require__(15)); /* eslint-disable no-param-reassign */ // Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves // to learn the context in which each easing should be used. var easing = { // This is the most common easing curve. easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)', // Objects enter the screen at full velocity from off-screen and // slowly decelerate to a resting point. easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)', // Objects leave the screen at full velocity. They do not decelerate when off-screen. easeIn: 'cubic-bezier(0.4, 0, 1, 1)', // The sharp curve is used by objects that may return to the screen at any time. sharp: 'cubic-bezier(0.4, 0, 0.6, 1)' }; // Follow https://material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations // to learn when use what timing exports.easing = easing; var duration = { shortest: 150, shorter: 200, short: 250, // most basic recommended timing standard: 300, // this is to be used in complex animations complex: 375, // recommended when something is entering screen enteringScreen: 225, // recommended when something is leaving screen leavingScreen: 195 }; exports.duration = duration; var formatMs = function formatMs(milliseconds) { return "".concat(Math.round(milliseconds), "ms"); }; exports.formatMs = formatMs; var isString = function isString(value) { return typeof value === 'string'; }; exports.isString = isString; var isNumber = function isNumber(value) { return !(0, _isNan.default)(parseFloat(value)); }; /** * @param {string|Array} props * @param {object} param * @param {string} param.prop * @param {number} param.duration * @param {string} param.easing * @param {number} param.delay */ exports.isNumber = isNumber; var _default = { easing: easing, duration: duration, create: function create() { var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['all']; var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; return function () { var _options$duration = options.duration, durationOption = _options$duration === void 0 ? duration.standard : _options$duration, _options$easing = options.easing, easingOption = _options$easing === void 0 ? easing.easeInOut : _options$easing, _options$delay = options.delay, delay = _options$delay === void 0 ? 0 : _options$delay, other = (0, _objectWithoutProperties2.default)(options, ["duration", "easing", "delay"]); false ? (0, _warning.default)(isString(props) || Array.isArray(props), 'Material-UI: argument "props" must be a string or Array.') : void 0; false ? (0, _warning.default)(isNumber(durationOption) || isString(durationOption), "Material-UI: argument \"duration\" must be a number or a string but found ".concat(durationOption, ".")) : void 0; false ? (0, _warning.default)(isString(easingOption), 'Material-UI: argument "easing" must be a string.') : void 0; false ? (0, _warning.default)(isNumber(delay) || isString(delay), 'Material-UI: argument "delay" must be a number or a string.') : void 0; false ? (0, _warning.default)((0, _keys.default)(other).length === 0, "Material-UI: unrecognized argument(s) [".concat((0, _keys.default)(other).join(','), "]")) : void 0; return (Array.isArray(props) ? props : [props]).map(function (animatedProp) { return "".concat(animatedProp, " ").concat(typeof durationOption === 'string' ? durationOption : formatMs(durationOption), " ").concat(easingOption, " ").concat(typeof delay === 'string' ? delay : formatMs(delay)); }).join(','); }(); }, getAutoHeightDuration: function getAutoHeightDuration(height) { if (!height) { return 0; } var constant = height / 36; // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10 return Math.round((4 + 15 * Math.pow(constant, 0.25) + constant / 5) * 10); } }; exports.default = _default; /***/ }), /* 82 */ /***/ (function(module, exports) { module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; /***/ }), /* 83 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _createRule = __webpack_require__(107); var _createRule2 = _interopRequireDefault(_createRule); var _linkRule = __webpack_require__(263); var _linkRule2 = _interopRequireDefault(_linkRule); var _StyleRule = __webpack_require__(67); var _StyleRule2 = _interopRequireDefault(_StyleRule); var _escape = __webpack_require__(548); var _escape2 = _interopRequireDefault(_escape); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /** * Contains rules objects and allows adding/removing etc. * Is used for e.g. by `StyleSheet` or `ConditionalRule`. */ var RuleList = function () { // Original styles object. function RuleList(options) { var _this = this; _classCallCheck(this, RuleList); this.map = {}; this.raw = {}; this.index = []; this.update = function (name, data) { var _options = _this.options, plugins = _options.jss.plugins, sheet = _options.sheet; if (typeof name === 'string') { plugins.onUpdate(data, _this.get(name), sheet); } else { for (var index = 0; index < _this.index.length; index++) { plugins.onUpdate(name, _this.index[index], sheet); } } }; this.options = options; this.classes = options.classes; } /** * Create and register rule. * * Will not render after Style Sheet was rendered the first time. */ // Used to ensure correct rules order. // Rules registry for access by .get() method. // It contains the same rule registered by name and by selector. _createClass(RuleList, [{ key: 'add', value: function add(name, decl, options) { var _options2 = this.options, parent = _options2.parent, sheet = _options2.sheet, jss = _options2.jss, Renderer = _options2.Renderer, generateClassName = _options2.generateClassName; options = _extends({ classes: this.classes, parent: parent, sheet: sheet, jss: jss, Renderer: Renderer, generateClassName: generateClassName }, options); if (!options.selector && this.classes[name]) { options.selector = '.' + (0, _escape2['default'])(this.classes[name]); } this.raw[name] = decl; var rule = (0, _createRule2['default'])(name, decl, options); var className = void 0; if (!options.selector && rule instanceof _StyleRule2['default']) { className = generateClassName(rule, sheet); rule.selector = '.' + (0, _escape2['default'])(className); } this.register(rule, className); var index = options.index === undefined ? this.index.length : options.index; this.index.splice(index, 0, rule); return rule; } /** * Get a rule. */ }, { key: 'get', value: function get(name) { return this.map[name]; } /** * Delete a rule. */ }, { key: 'remove', value: function remove(rule) { this.unregister(rule); this.index.splice(this.indexOf(rule), 1); } /** * Get index of a rule. */ }, { key: 'indexOf', value: function indexOf(rule) { return this.index.indexOf(rule); } /** * Run `onProcessRule()` plugins on every rule. */ }, { key: 'process', value: function process() { var plugins = this.options.jss.plugins; // We need to clone array because if we modify the index somewhere else during a loop // we end up with very hard-to-track-down side effects. this.index.slice(0).forEach(plugins.onProcessRule, plugins); } /** * Register a rule in `.map` and `.classes` maps. */ }, { key: 'register', value: function register(rule, className) { this.map[rule.key] = rule; if (rule instanceof _StyleRule2['default']) { this.map[rule.selector] = rule; if (className) this.classes[rule.key] = className; } } /** * Unregister a rule. */ }, { key: 'unregister', value: function unregister(rule) { delete this.map[rule.key]; if (rule instanceof _StyleRule2['default']) { delete this.map[rule.selector]; delete this.classes[rule.key]; } } /** * Update the function values with a new data. */ }, { key: 'link', /** * Link renderable rules with CSSRuleList. */ value: function link(cssRules) { var map = this.options.sheet.renderer.getUnescapedKeysMap(this.index); for (var i = 0; i < cssRules.length; i++) { var cssRule = cssRules[i]; var _key = this.options.sheet.renderer.getKey(cssRule); if (map[_key]) _key = map[_key]; var rule = this.map[_key]; if (rule) (0, _linkRule2['default'])(rule, cssRule); } } /** * Convert rules to a CSS string. */ }, { key: 'toString', value: function toString(options) { var str = ''; var sheet = this.options.sheet; var link = sheet ? sheet.options.link : false; for (var index = 0; index < this.index.length; index++) { var rule = this.index[index]; var css = rule.toString(options); // No need to render an empty rule. if (!css && !link) continue; if (str) str += '\n'; str += css; } return str; } }]); return RuleList; }(); exports['default'] = RuleList; /***/ }), /* 84 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.fixControlledValue = fixControlledValue; exports.resolveOnChange = resolveOnChange; exports.getInputClassName = getInputClassName; exports["default"] = exports.InputSizes = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var PropTypes = _interopRequireWildcard(__webpack_require__(1)); var _reactLifecyclesCompat = __webpack_require__(7); var _classnames = _interopRequireDefault(__webpack_require__(3)); var _omit = _interopRequireDefault(__webpack_require__(46)); var _type = __webpack_require__(71); var _ClearableLabeledInput = _interopRequireWildcard(__webpack_require__(274)); var _configProvider = __webpack_require__(14); var _warning = _interopRequireDefault(__webpack_require__(43)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var InputSizes = (0, _type.tuple)('small', 'default', 'large'); exports.InputSizes = InputSizes; function fixControlledValue(value) { if (typeof value === 'undefined' || value === null) { return ''; } return value; } function resolveOnChange(target, e, onChange) { if (onChange) { var event = e; if (e.type === 'click') { // click clear icon event = Object.create(e); event.target = target; event.currentTarget = target; var originalInputValue = target.value; // change target ref value cause e.target.value should be '' when clear input target.value = ''; onChange(event); // reset target ref value target.value = originalInputValue; return; } onChange(event); } } function getInputClassName(prefixCls, size, disabled) { var _classNames; return (0, _classnames["default"])(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-sm"), size === 'small'), _defineProperty(_classNames, "".concat(prefixCls, "-lg"), size === 'large'), _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames)); } var Input = /*#__PURE__*/ function (_React$Component) { _inherits(Input, _React$Component); function Input(props) { var _this; _classCallCheck(this, Input); _this = _possibleConstructorReturn(this, _getPrototypeOf(Input).call(this, props)); _this.saveClearableInput = function (input) { _this.clearableInput = input; }; _this.saveInput = function (input) { _this.input = input; }; _this.handleReset = function (e) { _this.setValue('', function () { _this.focus(); }); resolveOnChange(_this.input, e, _this.props.onChange); }; _this.renderInput = function (prefixCls) { var _this$props = _this.props, className = _this$props.className, addonBefore = _this$props.addonBefore, addonAfter = _this$props.addonAfter, size = _this$props.size, disabled = _this$props.disabled; // Fix https://fb.me/react-unknown-prop var otherProps = (0, _omit["default"])(_this.props, ['prefixCls', 'onPressEnter', 'addonBefore', 'addonAfter', 'prefix', 'suffix', 'allowClear', // Input elements must be either controlled or uncontrolled, // specify either the value prop, or the defaultValue prop, but not both. 'defaultValue', 'size', 'inputType']); return React.createElement("input", _extends({}, otherProps, { onChange: _this.handleChange, onKeyDown: _this.handleKeyDown, className: (0, _classnames["default"])(getInputClassName(prefixCls, size, disabled), _defineProperty({}, className, className && !addonBefore && !addonAfter)), ref: _this.saveInput })); }; _this.clearPasswordValueAttribute = function () { // https://github.com/ant-design/ant-design/issues/20541 _this.removePasswordTimeout = setTimeout(function () { if (_this.input && _this.input.getAttribute('type') === 'password' && _this.input.hasAttribute('value')) { _this.input.removeAttribute('value'); } }); }; _this.handleChange = function (e) { _this.setValue(e.target.value, _this.clearPasswordValueAttribute); resolveOnChange(_this.input, e, _this.props.onChange); }; _this.handleKeyDown = function (e) { var _this$props2 = _this.props, onPressEnter = _this$props2.onPressEnter, onKeyDown = _this$props2.onKeyDown; if (e.keyCode === 13 && onPressEnter) { onPressEnter(e); } if (onKeyDown) { onKeyDown(e); } }; _this.renderComponent = function (_ref) { var getPrefixCls = _ref.getPrefixCls; var value = _this.state.value; var customizePrefixCls = _this.props.prefixCls; var prefixCls = getPrefixCls('input', customizePrefixCls); return React.createElement(_ClearableLabeledInput["default"], _extends({}, _this.props, { prefixCls: prefixCls, inputType: "input", value: fixControlledValue(value), element: _this.renderInput(prefixCls), handleReset: _this.handleReset, ref: _this.saveClearableInput })); }; var value = typeof props.value === 'undefined' ? props.defaultValue : props.value; _this.state = { value: value }; return _this; } _createClass(Input, [{ key: "componentDidMount", value: function componentDidMount() { this.clearPasswordValueAttribute(); } // Since polyfill `getSnapshotBeforeUpdate` need work with `componentDidUpdate`. // We keep an empty function here. }, { key: "componentDidUpdate", value: function componentDidUpdate() {} }, { key: "getSnapshotBeforeUpdate", value: function getSnapshotBeforeUpdate(prevProps) { if ((0, _ClearableLabeledInput.hasPrefixSuffix)(prevProps) !== (0, _ClearableLabeledInput.hasPrefixSuffix)(this.props)) { (0, _warning["default"])(this.input !== document.activeElement, 'Input', "When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"); } return null; } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (this.removePasswordTimeout) { clearTimeout(this.removePasswordTimeout); } } }, { key: "focus", value: function focus() { this.input.focus(); } }, { key: "blur", value: function blur() { this.input.blur(); } }, { key: "select", value: function select() { this.input.select(); } }, { key: "setValue", value: function setValue(value, callback) { if (!('value' in this.props)) { this.setState({ value: value }, callback); } } }, { key: "render", value: function render() { return React.createElement(_configProvider.ConfigConsumer, null, this.renderComponent); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps) { if ('value' in nextProps) { return { value: nextProps.value }; } return null; } }]); return Input; }(React.Component); Input.defaultProps = { type: 'text' }; Input.propTypes = { type: PropTypes.string, id: PropTypes.string, size: PropTypes.oneOf(InputSizes), maxLength: PropTypes.number, disabled: PropTypes.bool, value: PropTypes.any, defaultValue: PropTypes.any, className: PropTypes.string, addonBefore: PropTypes.node, addonAfter: PropTypes.node, prefixCls: PropTypes.string, onPressEnter: PropTypes.func, onKeyDown: PropTypes.func, onKeyUp: PropTypes.func, onFocus: PropTypes.func, onBlur: PropTypes.func, prefix: PropTypes.node, suffix: PropTypes.node, allowClear: PropTypes.bool }; (0, _reactLifecyclesCompat.polyfill)(Input); var _default = Input; exports["default"] = _default; //# sourceMappingURL=Input.js.map /***/ }), /* 85 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.Encoders = exports.Decoders = exports.encodeNumericObject = exports.encodeNumericArray = undefined; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); exports.encodeDate = encodeDate; exports.decodeDate = decodeDate; exports.encodeBoolean = encodeBoolean; exports.decodeBoolean = decodeBoolean; exports.encodeNumber = encodeNumber; exports.decodeNumber = decodeNumber; exports.encodeString = encodeString; exports.decodeString = decodeString; exports.encodeJson = encodeJson; exports.decodeJson = decodeJson; exports.encodeArray = encodeArray; exports.decodeArray = decodeArray; exports.decodeNumericArray = decodeNumericArray; exports.encodeObject = encodeObject; exports.decodeObject = decodeObject; exports.decodeNumericObject = decodeNumericObject; exports.decode = decode; exports.encode = encode; var _urlQueryConfig = __webpack_require__(86); var _urlQueryConfig2 = _interopRequireDefault(_urlQueryConfig); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } /** * Functions for encoding and decoding values as strings. */ /** * Encodes a date as a string in YYYY-MM-DD format. * * @param {Date} date * @return {String} the encoded date */ function encodeDate(date) { if (date == null) { return date; } var year = date.getFullYear(); var month = date.getMonth() + 1; var day = date.getDate(); return year + '-' + (month < 10 ? '0' + month : month) + '-' + (day < 10 ? '0' + day : day); } /** * Converts a date in the format 'YYYY-mm-dd...' into a proper date, because * new Date() does not do that correctly. The date can be as complete or incomplete * as necessary (aka, '2015', '2015-10', '2015-10-01'). * It will not work for dates that have times included in them. * * @param {String} dateString String date form like '2015-10-01' * @return {Date} parsed date */ function decodeDate(dateString) { if (dateString == null || !dateString.length) { return undefined; } var parts = dateString.split('-'); // may only be a year so won't even have a month if (parts[1] != null) { parts[1] -= 1; // Note: months are 0-based } else { // just a year, set the month and day to the first parts[1] = 0; parts[2] = 1; } var decoded = new (Function.prototype.bind.apply(Date, [null].concat(_toConsumableArray(parts))))(); if (isNaN(decoded.getTime())) { return undefined; } return decoded; } /** * Encodes a boolean as a string. true -> "1", false -> "0". * * @param {Boolean} bool * @return {String} the encoded boolean */ function encodeBoolean(bool) { if (bool === undefined) { return undefined; } return bool ? '1' : '0'; } /** * Decodes a boolean from a string. "1" -> true, "0" -> false. * Everything else maps to undefined. * * @param {String} boolStr the encoded boolean string * @return {Boolean} the boolean value */ function decodeBoolean(boolStr) { if (boolStr === '1') { return true; } else if (boolStr === '0') { return false; } return undefined; } /** * Encodes a number as a string. * * @param {Number} num * @return {String} the encoded number */ function encodeNumber(num) { if (num == null) { return undefined; } return String(num); } /** * Decodes a number from a string via parseFloat. If the number is invalid, * it returns undefined. * * @param {String} numStr the encoded number string * @return {Number} the number value */ function decodeNumber(numStr) { if (numStr == null) { return undefined; } var result = parseFloat(numStr); if (isNaN(result)) { return undefined; } return result; } /** * Encodes a string while safely handling null and undefined values. * * @param {String} string * @return {String} the encoded string */ function encodeString(str) { if (str == null) { return undefined; } return String(str); } /** * Decodes a string while safely handling null and undefined values. * * @param {String} str the encoded string * @return {String} the string value */ function decodeString(str) { if (str == null) { return undefined; } return String(str); } /** * Encodes anything as a JSON string. * * @param {Any} any The thing to be encoded * @return {String} The JSON string representation of any */ function encodeJson(any) { if (any == null) { return undefined; } return JSON.stringify(any); } /** * Decodes a JSON string into javascript * * @param {String} jsonStr The JSON string representation * @return {Any} The javascript representation */ function decodeJson(jsonStr) { if (!jsonStr) { return undefined; } var result = void 0; try { result = JSON.parse(jsonStr); } catch (e) { /* ignore errors, returning undefined */ } return result; } /** * Encodes an array as a JSON string. * * @param {Array} array The array to be encoded * @return {String} The JSON string representation of array */ function encodeArray(array) { var entrySeparator = arguments.length <= 1 || arguments[1] === undefined ? _urlQueryConfig2.default.entrySeparator : arguments[1]; if (!array) { return undefined; } return array.join(entrySeparator); } /** * Decodes a JSON string into javascript array * * @param {String} jsonStr The JSON string representation * @return {Array} The javascript representation */ function decodeArray(arrayStr) { var entrySeparator = arguments.length <= 1 || arguments[1] === undefined ? _urlQueryConfig2.default.entrySeparator : arguments[1]; if (!arrayStr) { return undefined; } return arrayStr.split(entrySeparator).map(function (item) { return item === '' ? undefined : item; }); } /** * Encodes a numeric array as a JSON string. (alias of encodeArray) * * @param {Array} array The array to be encoded * @return {String} The JSON string representation of array */ var encodeNumericArray = exports.encodeNumericArray = encodeArray; /** * Decodes a JSON string into javascript array where all entries are numbers * * @param {String} jsonStr The JSON string representation * @return {Array} The javascript representation */ function decodeNumericArray(arrayStr) { var entrySeparator = arguments.length <= 1 || arguments[1] === undefined ? _urlQueryConfig2.default.entrySeparator : arguments[1]; var decoded = decodeArray(arrayStr, entrySeparator); if (!decoded) { return undefined; } return decoded.map(function (d) { return d == null ? d : +d; }); } /** * Encode simple objects as readable strings. Currently works only for simple, * flat objects where values are numbers, booleans or strings. * * For example { foo: bar, boo: baz } -> "foo-bar_boo-baz" * * @param {Object} object The object to encode * @param {String} keyValSeparator="-" The separator between keys and values * @param {String} entrySeparator="_" The separator between entries * @return {String} The encoded object */ function encodeObject(obj) { var keyValSeparator = arguments.length <= 1 || arguments[1] === undefined ? _urlQueryConfig2.default.keyValSeparator : arguments[1]; var entrySeparator = arguments.length <= 2 || arguments[2] === undefined ? _urlQueryConfig2.default.entrySeparator : arguments[2]; if (!obj || !Object.keys(obj).length) { return undefined; } return Object.keys(obj).map(function (key) { return '' + key + keyValSeparator + obj[key]; }).join(entrySeparator); } /** * Decodes a simple object to javascript. Currently works only for simple, * flat objects where values are numbers, booleans or strings. * * For example "foo-bar_boo-baz" -> { foo: bar, boo: baz } * * @param {String} objStr The object string to decode * @param {String} keyValSeparator="-" The separator between keys and values * @param {String} entrySeparator="_" The separator between entries * @return {Object} The javascript object */ function decodeObject(objStr) { var keyValSeparator = arguments.length <= 1 || arguments[1] === undefined ? _urlQueryConfig2.default.keyValSeparator : arguments[1]; var entrySeparator = arguments.length <= 2 || arguments[2] === undefined ? _urlQueryConfig2.default.entrySeparator : arguments[2]; if (!objStr || !objStr.length) { return undefined; } var obj = {}; objStr.split(entrySeparator).forEach(function (entryStr) { var _entryStr$split = entryStr.split(keyValSeparator); var _entryStr$split2 = _slicedToArray(_entryStr$split, 2); var key = _entryStr$split2[0]; var value = _entryStr$split2[1]; obj[key] = value; }); return obj; } /** * Encode simple objects as readable strings. Alias of encodeObject. * * For example { foo: 123, boo: 521 } -> "foo-123_boo-521" * * @param {Object} object The object to encode * @param {String} keyValSeparator="-" The separator between keys and values * @param {String} entrySeparator="_" The separator between entries * @return {String} The encoded object */ var encodeNumericObject = exports.encodeNumericObject = encodeObject; /** * Decodes a simple object to javascript where all values are numbers. * Currently works only for simple, flat objects. * * For example "foo-123_boo-521" -> { foo: 123, boo: 521 } * * @param {String} objStr The object string to decode * @param {String} keyValSeparator="-" The separator between keys and values * @param {String} entrySeparator="_" The separator between entries * @return {Object} The javascript object */ function decodeNumericObject(objStr) { var keyValSeparator = arguments.length <= 1 || arguments[1] === undefined ? _urlQueryConfig2.default.keyValSeparator : arguments[1]; var entrySeparator = arguments.length <= 2 || arguments[2] === undefined ? _urlQueryConfig2.default.entrySeparator : arguments[2]; var decoded = decodeObject(objStr, keyValSeparator, entrySeparator); if (!decoded) { return undefined; } // convert to numbers Object.keys(decoded).forEach(function (key) { decoded[key] = decoded[key] == null ? decoded[key] : +decoded[key]; }); return decoded; } /** * Collection of Decoders by type */ var Decoders = exports.Decoders = { number: decodeNumber, string: decodeString, object: decodeObject, array: decodeArray, json: decodeJson, date: decodeDate, boolean: decodeBoolean, numericObject: decodeNumericObject, numericArray: decodeNumericArray }; /** * Generic decode function that takes a type as an argument. * * @param {String|Function} type If a function, it is used to decode, otherwise the string is * the key for the decoder in the Decoders collection. * @param {String} encodedValue the value to decode * @param {Any} defaultValue The default value to use if encodedValue is undefined. * @return {Any} The decoded value */ function decode(type, encodedValue, defaultValue) { var decodedValue = void 0; if (typeof type === 'function') { decodedValue = type(encodedValue, defaultValue); } else if ((typeof type === 'undefined' ? 'undefined' : _typeof(type)) === 'object' && type.decode) { decodedValue = type.decode(encodedValue, defaultValue); } else if (encodedValue === undefined) { decodedValue = defaultValue; } else if (Decoders[type]) { decodedValue = Decoders[type](encodedValue); } else { decodedValue = encodedValue; } return decodedValue; } /** * Collection of Decoders by type */ var Encoders = exports.Encoders = { number: encodeNumber, string: encodeString, object: encodeObject, array: encodeArray, json: encodeJson, date: encodeDate, boolean: encodeBoolean, numericObject: encodeNumericObject, numericArray: encodeNumericArray }; /** * Generic encode function that takes a type as an argument. * * @param {String|Function} type If a function, it is used to encode, otherwise the string is * the key for the encoder in the Encoders collection. * @param {String} decodedValue the value to encode * @return {Any} The encoded value */ function encode(type, decodedValue) { var encodedValue = void 0; if (typeof type === 'function') { encodedValue = type(decodedValue); } else if ((typeof type === 'undefined' ? 'undefined' : _typeof(type)) === 'object' && type.encode) { encodedValue = type.encode(decodedValue); } else if (Encoders[type]) { encodedValue = Encoders[type](decodedValue); } else { encodedValue = decodedValue; } return encodedValue; } /***/ }), /* 86 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; // function to create the singleton options object that can be shared // throughout an application function createUrlQueryConfig() { // default options return { // add in generated URL change handlers based on a urlPropsQueryConfig if provided addUrlChangeHandlers: true, // add in `props.params` from react-router to the url object addRouterParams: true, // function to specify change handler name (onChange) changeHandlerName: function changeHandlerName(propName) { return 'onChange' + propName[0].toUpperCase() + propName.substring(1); }, // use this history if no history is specified history: { push: function push() { // eslint-disable-next-line console.error('No history provided to react-url-query. Please provide one via configureUrlQuery.'); }, replace: function replace() { // eslint-disable-next-line console.error('No history provided to react-url-query. Please provide one via configureUrlQuery.'); } }, // reads in location from react-router-redux if available and passes it // to the reducer in the urlQueryMiddleware readLocationFromStore: function readLocationFromStore(state) { if (state && state.routing) { return state.routing.locationBeforeTransitions; } return undefined; }, /** * The separator between entries * @default {String} "_" */ entrySeparator: '_', /** * The separator between keys and values * @default {String} "-" */ keyValSeparator: '-' }; } exports.default = createUrlQueryConfig(); /***/ }), /* 87 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var UrlUpdateTypes = { replace: 'replace', replaceIn: 'replaceIn', push: 'push', pushIn: 'pushIn' }; exports.default = UrlUpdateTypes; /***/ }), /* 88 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(31); __webpack_require__(639); //# sourceMappingURL=css.js.map /***/ }), /* 89 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.create = exports.connect = exports.Provider = undefined; var _Provider2 = __webpack_require__(748); var _Provider3 = _interopRequireDefault(_Provider2); var _connect2 = __webpack_require__(749); var _connect3 = _interopRequireDefault(_connect2); var _create2 = __webpack_require__(751); var _create3 = _interopRequireDefault(_create2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.Provider = _Provider3.default; exports.connect = _connect3.default; exports.create = _create3.default; /***/ }), /* 90 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(19); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(11); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_dom__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react_dom__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_rc_util_es_Dom_contains__ = __webpack_require__(280); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_rc_util_es_Dom_addEventListener__ = __webpack_require__(281); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_rc_util_es_ContainerRender__ = __webpack_require__(706); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_rc_util_es_Portal__ = __webpack_require__(707); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_classnames__ = __webpack_require__(3); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_11_classnames__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__utils__ = __webpack_require__(282); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__Popup__ = __webpack_require__(708); function noop() {} function returnEmptyString() { return ''; } function returnDocument() { return window.document; } var ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur', 'onContextMenu']; var IS_REACT_16 = !!__WEBPACK_IMPORTED_MODULE_6_react_dom__["createPortal"]; var contextTypes = { rcTrigger: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.shape({ onPopupMouseDown: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func }) }; var Trigger = function (_React$Component) { __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(Trigger, _React$Component); function Trigger(props) { __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, Trigger); var _this = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props)); _initialiseProps.call(_this); var popupVisible = void 0; if ('popupVisible' in props) { popupVisible = !!props.popupVisible; } else { popupVisible = !!props.defaultPopupVisible; } _this.prevPopupVisible = popupVisible; _this.state = { popupVisible: popupVisible }; return _this; } Trigger.prototype.getChildContext = function getChildContext() { return { rcTrigger: { onPopupMouseDown: this.onPopupMouseDown } }; }; Trigger.prototype.componentWillMount = function componentWillMount() { var _this2 = this; ALL_HANDLERS.forEach(function (h) { _this2['fire' + h] = function (e) { _this2.fireEvents(h, e); }; }); }; Trigger.prototype.componentDidMount = function componentDidMount() { this.componentDidUpdate({}, { popupVisible: this.state.popupVisible }); }; Trigger.prototype.componentWillReceiveProps = function componentWillReceiveProps(_ref) { var popupVisible = _ref.popupVisible; if (popupVisible !== undefined) { this.setState({ popupVisible: popupVisible }); } }; Trigger.prototype.componentDidUpdate = function componentDidUpdate(_, prevState) { var props = this.props; var state = this.state; var triggerAfterPopupVisibleChange = function triggerAfterPopupVisibleChange() { if (prevState.popupVisible !== state.popupVisible) { props.afterPopupVisibleChange(state.popupVisible); } }; if (!IS_REACT_16) { this.renderComponent(null, triggerAfterPopupVisibleChange); } this.prevPopupVisible = prevState.popupVisible; // We must listen to `mousedown` or `touchstart`, edge case: // https://github.com/ant-design/ant-design/issues/5804 // https://github.com/react-component/calendar/issues/250 // https://github.com/react-component/trigger/issues/50 if (state.popupVisible) { var currentDocument = void 0; if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) { currentDocument = props.getDocument(); this.clickOutsideHandler = Object(__WEBPACK_IMPORTED_MODULE_8_rc_util_es_Dom_addEventListener__["a" /* default */])(currentDocument, 'mousedown', this.onDocumentClick); } // always hide on mobile if (!this.touchOutsideHandler) { currentDocument = currentDocument || props.getDocument(); this.touchOutsideHandler = Object(__WEBPACK_IMPORTED_MODULE_8_rc_util_es_Dom_addEventListener__["a" /* default */])(currentDocument, 'touchstart', this.onDocumentClick); } // close popup when trigger type contains 'onContextMenu' and document is scrolling. if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) { currentDocument = currentDocument || props.getDocument(); this.contextMenuOutsideHandler1 = Object(__WEBPACK_IMPORTED_MODULE_8_rc_util_es_Dom_addEventListener__["a" /* default */])(currentDocument, 'scroll', this.onContextMenuClose); } // close popup when trigger type contains 'onContextMenu' and window is blur. if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) { this.contextMenuOutsideHandler2 = Object(__WEBPACK_IMPORTED_MODULE_8_rc_util_es_Dom_addEventListener__["a" /* default */])(window, 'blur', this.onContextMenuClose); } return; } this.clearOutsideHandler(); }; Trigger.prototype.componentWillUnmount = function componentWillUnmount() { this.clearDelayTimer(); this.clearOutsideHandler(); clearTimeout(this.mouseDownTimeout); }; Trigger.prototype.getPopupDomNode = function getPopupDomNode() { // for test if (this._component && this._component.getPopupDomNode) { return this._component.getPopupDomNode(); } return null; }; Trigger.prototype.getPopupAlign = function getPopupAlign() { var props = this.props; var popupPlacement = props.popupPlacement, popupAlign = props.popupAlign, builtinPlacements = props.builtinPlacements; if (popupPlacement && builtinPlacements) { return Object(__WEBPACK_IMPORTED_MODULE_12__utils__["a" /* getAlignFromPlacement */])(builtinPlacements, popupPlacement, popupAlign); } return popupAlign; }; /** * @param popupVisible Show or not the popup element * @param event SyntheticEvent, used for `pointAlign` */ Trigger.prototype.setPopupVisible = function setPopupVisible(popupVisible, event) { var alignPoint = this.props.alignPoint; this.clearDelayTimer(); if (this.state.popupVisible !== popupVisible) { if (!('popupVisible' in this.props)) { this.setState({ popupVisible: popupVisible }); } this.props.onPopupVisibleChange(popupVisible); } // Always record the point position since mouseEnterDelay will delay the show if (alignPoint && event) { this.setPoint(event); } }; Trigger.prototype.delaySetPopupVisible = function delaySetPopupVisible(visible, delayS, event) { var _this3 = this; var delay = delayS * 1000; this.clearDelayTimer(); if (delay) { var point = event ? { pageX: event.pageX, pageY: event.pageY } : null; this.delayTimer = setTimeout(function () { _this3.setPopupVisible(visible, point); _this3.clearDelayTimer(); }, delay); } else { this.setPopupVisible(visible, event); } }; Trigger.prototype.clearDelayTimer = function clearDelayTimer() { if (this.delayTimer) { clearTimeout(this.delayTimer); this.delayTimer = null; } }; Trigger.prototype.clearOutsideHandler = function clearOutsideHandler() { if (this.clickOutsideHandler) { this.clickOutsideHandler.remove(); this.clickOutsideHandler = null; } if (this.contextMenuOutsideHandler1) { this.contextMenuOutsideHandler1.remove(); this.contextMenuOutsideHandler1 = null; } if (this.contextMenuOutsideHandler2) { this.contextMenuOutsideHandler2.remove(); this.contextMenuOutsideHandler2 = null; } if (this.touchOutsideHandler) { this.touchOutsideHandler.remove(); this.touchOutsideHandler = null; } }; Trigger.prototype.createTwoChains = function createTwoChains(event) { var childPros = this.props.children.props; var props = this.props; if (childPros[event] && props[event]) { return this['fire' + event]; } return childPros[event] || props[event]; }; Trigger.prototype.isClickToShow = function isClickToShow() { var _props = this.props, action = _props.action, showAction = _props.showAction; return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1; }; Trigger.prototype.isContextMenuToShow = function isContextMenuToShow() { var _props2 = this.props, action = _props2.action, showAction = _props2.showAction; return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1; }; Trigger.prototype.isClickToHide = function isClickToHide() { var _props3 = this.props, action = _props3.action, hideAction = _props3.hideAction; return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1; }; Trigger.prototype.isMouseEnterToShow = function isMouseEnterToShow() { var _props4 = this.props, action = _props4.action, showAction = _props4.showAction; return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1; }; Trigger.prototype.isMouseLeaveToHide = function isMouseLeaveToHide() { var _props5 = this.props, action = _props5.action, hideAction = _props5.hideAction; return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1; }; Trigger.prototype.isFocusToShow = function isFocusToShow() { var _props6 = this.props, action = _props6.action, showAction = _props6.showAction; return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1; }; Trigger.prototype.isBlurToHide = function isBlurToHide() { var _props7 = this.props, action = _props7.action, hideAction = _props7.hideAction; return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1; }; Trigger.prototype.forcePopupAlign = function forcePopupAlign() { if (this.state.popupVisible && this._component && this._component.alignInstance) { this._component.alignInstance.forceAlign(); } }; Trigger.prototype.fireEvents = function fireEvents(type, e) { var childCallback = this.props.children.props[type]; if (childCallback) { childCallback(e); } var callback = this.props[type]; if (callback) { callback(e); } }; Trigger.prototype.close = function close() { this.setPopupVisible(false); }; Trigger.prototype.render = function render() { var _this4 = this; var popupVisible = this.state.popupVisible; var _props8 = this.props, children = _props8.children, forceRender = _props8.forceRender, alignPoint = _props8.alignPoint, className = _props8.className; var child = __WEBPACK_IMPORTED_MODULE_4_react___default.a.Children.only(children); var newChildProps = { key: 'trigger' }; if (this.isContextMenuToShow()) { newChildProps.onContextMenu = this.onContextMenu; } else { newChildProps.onContextMenu = this.createTwoChains('onContextMenu'); } if (this.isClickToHide() || this.isClickToShow()) { newChildProps.onClick = this.onClick; newChildProps.onMouseDown = this.onMouseDown; newChildProps.onTouchStart = this.onTouchStart; } else { newChildProps.onClick = this.createTwoChains('onClick'); newChildProps.onMouseDown = this.createTwoChains('onMouseDown'); newChildProps.onTouchStart = this.createTwoChains('onTouchStart'); } if (this.isMouseEnterToShow()) { newChildProps.onMouseEnter = this.onMouseEnter; if (alignPoint) { newChildProps.onMouseMove = this.onMouseMove; } } else { newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter'); } if (this.isMouseLeaveToHide()) { newChildProps.onMouseLeave = this.onMouseLeave; } else { newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave'); } if (this.isFocusToShow() || this.isBlurToHide()) { newChildProps.onFocus = this.onFocus; newChildProps.onBlur = this.onBlur; } else { newChildProps.onFocus = this.createTwoChains('onFocus'); newChildProps.onBlur = this.createTwoChains('onBlur'); } var childrenClassName = __WEBPACK_IMPORTED_MODULE_11_classnames___default()(child && child.props && child.props.className, className); if (childrenClassName) { newChildProps.className = childrenClassName; } var trigger = __WEBPACK_IMPORTED_MODULE_4_react___default.a.cloneElement(child, newChildProps); if (!IS_REACT_16) { return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement( __WEBPACK_IMPORTED_MODULE_9_rc_util_es_ContainerRender__["a" /* default */], { parent: this, visible: popupVisible, autoMount: false, forceRender: forceRender, getComponent: this.getComponent, getContainer: this.getContainer }, function (_ref2) { var renderComponent = _ref2.renderComponent; _this4.renderComponent = renderComponent; return trigger; } ); } var portal = void 0; // prevent unmounting after it's rendered if (popupVisible || this._component || forceRender) { portal = __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement( __WEBPACK_IMPORTED_MODULE_10_rc_util_es_Portal__["a" /* default */], { key: 'portal', getContainer: this.getContainer, didUpdate: this.handlePortalUpdate }, this.getComponent() ); } return [trigger, portal]; }; return Trigger; }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component); Trigger.propTypes = { children: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.any, action: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string)]), showAction: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.any, hideAction: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.any, getPopupClassNameFromAlign: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.any, onPopupVisibleChange: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, afterPopupVisibleChange: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, popup: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.node, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func]).isRequired, popupStyle: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object, prefixCls: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, popupClassName: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, className: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, popupPlacement: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, builtinPlacements: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object, popupTransitionName: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object]), popupAnimation: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.any, mouseEnterDelay: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, mouseLeaveDelay: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, zIndex: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, focusDelay: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, blurDelay: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.number, getPopupContainer: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, getDocument: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, forceRender: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, destroyPopupOnHide: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, mask: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, maskClosable: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, onPopupAlign: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.func, popupAlign: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object, popupVisible: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, defaultPopupVisible: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool, maskTransitionName: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.object]), maskAnimation: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, stretch: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string, alignPoint: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool // Maybe we can support user pass position in the future }; Trigger.contextTypes = contextTypes; Trigger.childContextTypes = contextTypes; Trigger.defaultProps = { prefixCls: 'rc-trigger-popup', getPopupClassNameFromAlign: returnEmptyString, getDocument: returnDocument, onPopupVisibleChange: noop, afterPopupVisibleChange: noop, onPopupAlign: noop, popupClassName: '', mouseEnterDelay: 0, mouseLeaveDelay: 0.1, focusDelay: 0, blurDelay: 0.15, popupStyle: {}, destroyPopupOnHide: false, popupAlign: {}, defaultPopupVisible: false, mask: false, maskClosable: true, action: [], showAction: [], hideAction: [] }; var _initialiseProps = function _initialiseProps() { var _this5 = this; this.onMouseEnter = function (e) { var mouseEnterDelay = _this5.props.mouseEnterDelay; _this5.fireEvents('onMouseEnter', e); _this5.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e); }; this.onMouseMove = function (e) { _this5.fireEvents('onMouseMove', e); _this5.setPoint(e); }; this.onMouseLeave = function (e) { _this5.fireEvents('onMouseLeave', e); _this5.delaySetPopupVisible(false, _this5.props.mouseLeaveDelay); }; this.onPopupMouseEnter = function () { _this5.clearDelayTimer(); }; this.onPopupMouseLeave = function (e) { // https://github.com/react-component/trigger/pull/13 // react bug? if (e.relatedTarget && !e.relatedTarget.setTimeout && _this5._component && _this5._component.getPopupDomNode && Object(__WEBPACK_IMPORTED_MODULE_7_rc_util_es_Dom_contains__["a" /* default */])(_this5._component.getPopupDomNode(), e.relatedTarget)) { return; } _this5.delaySetPopupVisible(false, _this5.props.mouseLeaveDelay); }; this.onFocus = function (e) { _this5.fireEvents('onFocus', e); // incase focusin and focusout _this5.clearDelayTimer(); if (_this5.isFocusToShow()) { _this5.focusTime = Date.now(); _this5.delaySetPopupVisible(true, _this5.props.focusDelay); } }; this.onMouseDown = function (e) { _this5.fireEvents('onMouseDown', e); _this5.preClickTime = Date.now(); }; this.onTouchStart = function (e) { _this5.fireEvents('onTouchStart', e); _this5.preTouchTime = Date.now(); }; this.onBlur = function (e) { _this5.fireEvents('onBlur', e); _this5.clearDelayTimer(); if (_this5.isBlurToHide()) { _this5.delaySetPopupVisible(false, _this5.props.blurDelay); } }; this.onContextMenu = function (e) { e.preventDefault(); _this5.fireEvents('onContextMenu', e); _this5.setPopupVisible(true, e); }; this.onContextMenuClose = function () { if (_this5.isContextMenuToShow()) { _this5.close(); } }; this.onClick = function (event) { _this5.fireEvents('onClick', event); // focus will trigger click if (_this5.focusTime) { var preTime = void 0; if (_this5.preClickTime && _this5.preTouchTime) { preTime = Math.min(_this5.preClickTime, _this5.preTouchTime); } else if (_this5.preClickTime) { preTime = _this5.preClickTime; } else if (_this5.preTouchTime) { preTime = _this5.preTouchTime; } if (Math.abs(preTime - _this5.focusTime) < 20) { return; } _this5.focusTime = 0; } _this5.preClickTime = 0; _this5.preTouchTime = 0; if (event && event.preventDefault) { event.preventDefault(); } var nextVisible = !_this5.state.popupVisible; if (_this5.isClickToHide() && !nextVisible || nextVisible && _this5.isClickToShow()) { _this5.setPopupVisible(!_this5.state.popupVisible, event); } }; this.onPopupMouseDown = function () { var _context$rcTrigger = _this5.context.rcTrigger, rcTrigger = _context$rcTrigger === undefined ? {} : _context$rcTrigger; _this5.hasPopupMouseDown = true; clearTimeout(_this5.mouseDownTimeout); _this5.mouseDownTimeout = setTimeout(function () { _this5.hasPopupMouseDown = false; }, 0); if (rcTrigger.onPopupMouseDown) { rcTrigger.onPopupMouseDown.apply(rcTrigger, arguments); } }; this.onDocumentClick = function (event) { if (_this5.props.mask && !_this5.props.maskClosable) { return; } var target = event.target; var root = Object(__WEBPACK_IMPORTED_MODULE_6_react_dom__["findDOMNode"])(_this5); if (!Object(__WEBPACK_IMPORTED_MODULE_7_rc_util_es_Dom_contains__["a" /* default */])(root, target) && !_this5.hasPopupMouseDown) { _this5.close(); } }; this.getRootDomNode = function () { return Object(__WEBPACK_IMPORTED_MODULE_6_react_dom__["findDOMNode"])(_this5); }; this.getPopupClassNameFromAlign = function (align) { var className = []; var _props9 = _this5.props, popupPlacement = _props9.popupPlacement, builtinPlacements = _props9.builtinPlacements, prefixCls = _props9.prefixCls, alignPoint = _props9.alignPoint, getPopupClassNameFromAlign = _props9.getPopupClassNameFromAlign; if (popupPlacement && builtinPlacements) { className.push(Object(__WEBPACK_IMPORTED_MODULE_12__utils__["b" /* getAlignPopupClassName */])(builtinPlacements, prefixCls, align, alignPoint)); } if (getPopupClassNameFromAlign) { className.push(getPopupClassNameFromAlign(align)); } return className.join(' '); }; this.getComponent = function () { var _props10 = _this5.props, prefixCls = _props10.prefixCls, destroyPopupOnHide = _props10.destroyPopupOnHide, popupClassName = _props10.popupClassName, action = _props10.action, onPopupAlign = _props10.onPopupAlign, popupAnimation = _props10.popupAnimation, popupTransitionName = _props10.popupTransitionName, popupStyle = _props10.popupStyle, mask = _props10.mask, maskAnimation = _props10.maskAnimation, maskTransitionName = _props10.maskTransitionName, zIndex = _props10.zIndex, popup = _props10.popup, stretch = _props10.stretch, alignPoint = _props10.alignPoint; var _state = _this5.state, popupVisible = _state.popupVisible, point = _state.point; var align = _this5.getPopupAlign(); var mouseProps = {}; if (_this5.isMouseEnterToShow()) { mouseProps.onMouseEnter = _this5.onPopupMouseEnter; } if (_this5.isMouseLeaveToHide()) { mouseProps.onMouseLeave = _this5.onPopupMouseLeave; } mouseProps.onMouseDown = _this5.onPopupMouseDown; mouseProps.onTouchStart = _this5.onPopupMouseDown; return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement( __WEBPACK_IMPORTED_MODULE_13__Popup__["a" /* default */], __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({ prefixCls: prefixCls, destroyPopupOnHide: destroyPopupOnHide, visible: popupVisible, point: alignPoint && point, className: popupClassName, action: action, align: align, onAlign: onPopupAlign, animation: popupAnimation, getClassNameFromAlign: _this5.getPopupClassNameFromAlign }, mouseProps, { stretch: stretch, getRootDomNode: _this5.getRootDomNode, style: popupStyle, mask: mask, zIndex: zIndex, transitionName: popupTransitionName, maskAnimation: maskAnimation, maskTransitionName: maskTransitionName, ref: _this5.savePopup }), typeof popup === 'function' ? popup() : popup ); }; this.getContainer = function () { var props = _this5.props; var popupContainer = document.createElement('div'); // Make sure default popup container will never cause scrollbar appearing // https://github.com/react-component/trigger/issues/41 popupContainer.style.position = 'absolute'; popupContainer.style.top = '0'; popupContainer.style.left = '0'; popupContainer.style.width = '100%'; var mountNode = props.getPopupContainer ? props.getPopupContainer(Object(__WEBPACK_IMPORTED_MODULE_6_react_dom__["findDOMNode"])(_this5)) : props.getDocument().body; mountNode.appendChild(popupContainer); return popupContainer; }; this.setPoint = function (point) { var alignPoint = _this5.props.alignPoint; if (!alignPoint || !point) return; _this5.setState({ point: { pageX: point.pageX, pageY: point.pageY } }); }; this.handlePortalUpdate = function () { if (_this5.prevPopupVisible !== _this5.state.popupVisible) { _this5.props.afterPopupVisibleChange(_this5.state.popupVisible); } }; this.savePopup = function (node) { _this5._component = node; }; }; /* harmony default export */ __webpack_exports__["default"] = (Trigger); /***/ }), /* 91 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {var now = __webpack_require__(339) , root = typeof window === 'undefined' ? global : window , vendors = ['moz', 'webkit'] , suffix = 'AnimationFrame' , raf = root['request' + suffix] , caf = root['cancel' + suffix] || root['cancelRequest' + suffix] for(var i = 0; !raf && i < vendors.length; i++) { raf = root[vendors[i] + 'Request' + suffix] caf = root[vendors[i] + 'Cancel' + suffix] || root[vendors[i] + 'CancelRequest' + suffix] } // Some versions of FF have rAF but not cAF if(!raf || !caf) { var last = 0 , id = 0 , queue = [] , frameDuration = 1000 / 60 raf = function(callback) { if(queue.length === 0) { var _now = now() , next = Math.max(0, frameDuration - (_now - last)) last = next + _now setTimeout(function() { var cp = queue.slice(0) // Clear queue here to prevent // callbacks from appending listeners // to the current frame's queue queue.length = 0 for(var i = 0; i < cp.length; i++) { if(!cp[i].cancelled) { try{ cp[i].callback(last) } catch(e) { setTimeout(function() { throw e }, 0) } } } }, Math.round(next)) } queue.push({ handle: ++id, callback: callback, cancelled: false }) return id } caf = function(handle) { for(var i = 0; i < queue.length; i++) { if(queue[i].handle === handle) { queue[i].cancelled = true } } } } module.exports = function(fn) { // Wrap in a new function to prevent // `cancel` potentially being assigned // to the native rAF function return raf.call(root, fn) } module.exports.cancel = function() { caf.apply(root, arguments) } module.exports.polyfill = function(object) { if (!object) { object = root; } object.requestAnimationFrame = raf object.cancelAnimationFrame = caf } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(35))) /***/ }), /* 92 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, '__esModule', { value: true }); function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } var _classCallCheck = _interopDefault(__webpack_require__(626)); var _createClass = _interopDefault(__webpack_require__(627)); var _possibleConstructorReturn = _interopDefault(__webpack_require__(628)); var _inherits = _interopDefault(__webpack_require__(630)); var _typeof = _interopDefault(__webpack_require__(272)); var _objectWithoutProperties = _interopDefault(__webpack_require__(631)); var _objectSpread = _interopDefault(__webpack_require__(632)); var React = _interopDefault(__webpack_require__(0)); var PropTypes = _interopDefault(__webpack_require__(1)); var shallowEqual = _interopDefault(__webpack_require__(378)); var warning = _interopDefault(__webpack_require__(15)); function defineProperty(object, property, attr) { return Object.defineProperty(object, property, attr); } // Passive options // Inspired by https://github.com/Modernizr/Modernizr/blob/master/feature-detects/dom/passiveeventlisteners.js var passiveOption = function () { var cache = null; return function () { if (cache !== null) { return cache; } var supportsPassiveOption = false; try { window.addEventListener('test', null, defineProperty({}, 'passive', { get: function get() { supportsPassiveOption = true; } })); } catch (err) {// } cache = supportsPassiveOption; return supportsPassiveOption; }(); }(); var defaultEventOptions = { capture: false, passive: false }; function mergeDefaultEventOptions(options) { return _objectSpread({}, defaultEventOptions, options); } function getEventListenerArgs(eventName, callback, options) { var args = [eventName, callback]; args.push(passiveOption ? options : options.capture); return args; } function on(target, eventName, callback, options) { // eslint-disable-next-line prefer-spread target.addEventListener.apply(target, getEventListenerArgs(eventName, callback, options)); } function off(target, eventName, callback, options) { // eslint-disable-next-line prefer-spread target.removeEventListener.apply(target, getEventListenerArgs(eventName, callback, options)); } function forEachListener(props, iteratee) { var children = props.children, target = props.target, eventProps = _objectWithoutProperties(props, ["children", "target"]); Object.keys(eventProps).forEach(function (name) { if (name.substring(0, 2) !== 'on') { return; } var prop = eventProps[name]; var type = _typeof(prop); var isObject = type === 'object'; var isFunction = type === 'function'; if (!isObject && !isFunction) { return; } var capture = name.substr(-7).toLowerCase() === 'capture'; var eventName = name.substring(2).toLowerCase(); eventName = capture ? eventName.substring(0, eventName.length - 7) : eventName; if (isObject) { iteratee(eventName, prop.handler, prop.options); } else { iteratee(eventName, prop, mergeDefaultEventOptions({ capture: capture })); } }); } function withOptions(handler, options) { false ? warning(options, 'react-event-listener: should be specified options in withOptions.') : void 0; return { handler: handler, options: mergeDefaultEventOptions(options) }; } var EventListener = /*#__PURE__*/ function (_React$Component) { _inherits(EventListener, _React$Component); function EventListener() { _classCallCheck(this, EventListener); return _possibleConstructorReturn(this, (EventListener.__proto__ || Object.getPrototypeOf(EventListener)).apply(this, arguments)); } _createClass(EventListener, [{ key: "componentDidMount", value: function componentDidMount() { this.addListeners(); } }, { key: "shouldComponentUpdate", value: function shouldComponentUpdate(nextProps) { return !shallowEqual(this.props, nextProps); } }, { key: "componentWillUpdate", value: function componentWillUpdate() { this.removeListeners(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { this.addListeners(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this.removeListeners(); } }, { key: "addListeners", value: function addListeners() { this.applyListeners(on); } }, { key: "removeListeners", value: function removeListeners() { this.applyListeners(off); } }, { key: "applyListeners", value: function applyListeners(onOrOff) { var target = this.props.target; if (target) { var element = target; if (typeof target === 'string') { element = window[target]; } forEachListener(this.props, onOrOff.bind(null, element)); } } }, { key: "render", value: function render() { return this.props.children || null; } }]); return EventListener; }(React.Component); EventListener.propTypes = false ? { /** * You can provide a single child too. */ children: PropTypes.node, /** * The DOM target to listen to. */ target: PropTypes.oneOfType([PropTypes.object, PropTypes.string]).isRequired } : {}; exports.withOptions = withOptions; exports.default = EventListener; /***/ }), /* 93 */ /***/ (function(module, exports) { // shim for using process in browser var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it // don't break things. But we need to wrap it in a try catch in case it is // wrapped in strict mode code which doesn't define any globals. It's inside a // function because try/catches deoptimize in certain engines. var cachedSetTimeout; var cachedClearTimeout; function defaultSetTimout() { throw new Error('setTimeout has not been defined'); } function defaultClearTimeout () { throw new Error('clearTimeout has not been defined'); } (function () { try { if (typeof setTimeout === 'function') { cachedSetTimeout = setTimeout; } else { cachedSetTimeout = defaultSetTimout; } } catch (e) { cachedSetTimeout = defaultSetTimout; } try { if (typeof clearTimeout === 'function') { cachedClearTimeout = clearTimeout; } else { cachedClearTimeout = defaultClearTimeout; } } catch (e) { cachedClearTimeout = defaultClearTimeout; } } ()) function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { //normal enviroments in sane situations return setTimeout(fun, 0); } // if setTimeout wasn't available but was latter defined if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { cachedSetTimeout = setTimeout; return setTimeout(fun, 0); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun, 0); } catch(e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedSetTimeout.call(null, fun, 0); } catch(e){ // 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 return cachedSetTimeout.call(this, fun, 0); } } } function runClearTimeout(marker) { if (cachedClearTimeout === clearTimeout) { //normal enviroments in sane situations return clearTimeout(marker); } // if clearTimeout wasn't available but was latter defined if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { cachedClearTimeout = clearTimeout; return clearTimeout(marker); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); } catch (e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedClearTimeout.call(null, marker); } catch (e){ // 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. // Some versions of I.E. have different rules for clearTimeout vs setTimeout return cachedClearTimeout.call(this, marker); } } } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { if (!draining || !currentQueue) { return; } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = runTimeout(cleanUpNextTick); draining = true; var len = queue.length; while(len) { currentQueue = queue; queue = []; while (++queueIndex < len) { if (currentQueue) { currentQueue[queueIndex].run(); } } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; runClearTimeout(timeout); } process.nextTick = function (fun) { var args = new Array(arguments.length - 1); if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { runTimeout(drainQueue); } }; // v8 likes predictible objects function Item(fun, array) { this.fun = fun; this.array = array; } Item.prototype.run = function () { this.fun.apply(null, this.array); }; process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; process.version = ''; // empty string to avoid regexp issues process.versions = {}; function noop() {} process.on = noop; process.addListener = noop; process.once = noop; process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; process.prependListener = noop; process.prependOnceListener = noop; process.listeners = function (name) { return [] } process.binding = function (name) { throw new Error('process.binding is not supported'); }; process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; process.umask = function() { return 0; }; /***/ }), /* 94 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return fetchOJList; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return fetchDeleteOJItem; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return fetchPostOjForm; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return fetchGetOjById; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return fetchDebuggerCode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return fetchCodeSubmit; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return fetchStartProgram; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return fetchUserProgramDetail; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return fetchUserCommitRecord; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return fetchUserCommitRecordDetail; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return publishTask; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return cancelPublicTask; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return fetchUpdateCode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return fetchUserCodeSubmit; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return fetchRestoreInitialCode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return fetchUserInfoForNew; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return fetchUploadImage; }); /* unused harmony export fetchUploadImageUrl */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return fetchAddNotes; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return fetchQuestion; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return fetchTagDisciplines; }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__ = __webpack_require__(79); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_axios__ = __webpack_require__(8); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_axios__); function _asyncToGenerator(fn){return function(){var gen=fn.apply(this,arguments);return new Promise(function(resolve,reject){function step(key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{return Promise.resolve(value).then(function(value){step("next",value);},function(err){step("throw",err);});}}return step("next");});};}/* * @Description: 开发者社区接口 * @Author: tangjiang * @Github: * @Date: 2019-11-20 10:55:38 * @LastEditors : tangjiang * @LastEditTime : 2020-01-07 15:23:19 */var fetchOJList=function(){var _ref=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee(params){var obj;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:// console.log('传递的参数: ', params); obj={};Object.keys(params).forEach(function(key){if(params[key]){obj[key]=params[key];}});return _context.abrupt('return',__WEBPACK_IMPORTED_MODULE_1_axios___default.a.get('/problems.json',{params:obj}));case 3:case'end':return _context.stop();}}},_callee,this);}));return function fetchOJList(_x){return _ref.apply(this,arguments);};}();// 删除OJ列表 var fetchDeleteOJItem=function(){var _ref2=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee2(identifier){var url;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:url='/problems/'+identifier+'.json';return _context2.abrupt('return',__WEBPACK_IMPORTED_MODULE_1_axios___default.a.delete(url));case 2:case'end':return _context2.stop();}}},_callee2,this);}));return function fetchDeleteOJItem(_x2){return _ref2.apply(this,arguments);};}();// 提交 var fetchPostOjForm=function(){var _ref3=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee3(paramsObj){var params,submitType,identifier,url;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:params=paramsObj.params,submitType=paramsObj.submitType,identifier=paramsObj.identifier;url=submitType==='add'?'/problems.json':'/problems/'+identifier+'.json';// return axios.post(url, params); // if (identifier) { // return axios.post(url, params); // } else { // return // } return _context3.abrupt('return',identifier?__WEBPACK_IMPORTED_MODULE_1_axios___default.a.put(url,params):__WEBPACK_IMPORTED_MODULE_1_axios___default.a.post(url,params));case 3:case'end':return _context3.stop();}}},_callee3,this);}));return function fetchPostOjForm(_x3){return _ref3.apply(this,arguments);};}();// 根据id号获取OJ信息 var fetchGetOjById=function(){var _ref4=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee4(id){var url;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee4$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:url='/problems/'+id+'/edit.json';return _context4.abrupt('return',__WEBPACK_IMPORTED_MODULE_1_axios___default.a.get(url));case 2:case'end':return _context4.stop();}}},_callee4,this);}));return function fetchGetOjById(_x4){return _ref4.apply(this,arguments);};}();// 调试代码 var fetchDebuggerCode=function(){var _ref5=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee5(identifier,params){var url;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee5$(_context5){while(1){switch(_context5.prev=_context5.next){case 0:url='/myproblems/'+identifier+'/code_debug.json';return _context5.abrupt('return',__WEBPACK_IMPORTED_MODULE_1_axios___default.a.get(url,{params:params}));case 2:case'end':return _context5.stop();}}},_callee5,this);}));return function fetchDebuggerCode(_x5,_x6){return _ref5.apply(this,arguments);};}();// 调试代码成功后,循环调用提交接口 var fetchCodeSubmit=function(){var _ref6=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee6(identifier,params){var url;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee6$(_context6){while(1){switch(_context6.prev=_context6.next){case 0:url='/myproblems/'+identifier+'/result.json';return _context6.abrupt('return',__WEBPACK_IMPORTED_MODULE_1_axios___default.a.get(url,{params:params}));case 2:case'end':return _context6.stop();}}},_callee6,this);}));return function fetchCodeSubmit(_x7,_x8){return _ref6.apply(this,arguments);};}();// 开启编程题接口 var fetchStartProgram=function(){var _ref7=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee7(identifier){var url;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee7$(_context7){while(1){switch(_context7.prev=_context7.next){case 0:url='/problems/'+identifier+'/start.json';return _context7.abrupt('return',__WEBPACK_IMPORTED_MODULE_1_axios___default.a.get(url));case 2:case'end':return _context7.stop();}}},_callee7,this);}));return function fetchStartProgram(_x9){return _ref7.apply(this,arguments);};}();// 用户编程题详情 var fetchUserProgramDetail=function(){var _ref8=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee8(identifier){var url;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee8$(_context8){while(1){switch(_context8.prev=_context8.next){case 0:url='/myproblems/'+identifier+'.json';return _context8.abrupt('return',__WEBPACK_IMPORTED_MODULE_1_axios___default.a.get(url));case 2:case'end':return _context8.stop();}}},_callee8,this);}));return function fetchUserProgramDetail(_x10){return _ref8.apply(this,arguments);};}();// 获取提交记录 var fetchUserCommitRecord=function(){var _ref9=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee9(identifier,params){var url;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee9$(_context9){while(1){switch(_context9.prev=_context9.next){case 0:// console.log('identifier=====', identifier); url='/myproblems/'+identifier+'/submit_records.json';return _context9.abrupt('return',__WEBPACK_IMPORTED_MODULE_1_axios___default.a.get(url,{params:params}));case 2:case'end':return _context9.stop();}}},_callee9,this);}));return function fetchUserCommitRecord(_x11,_x12){return _ref9.apply(this,arguments);};}();// 获取提交记录详情 var fetchUserCommitRecordDetail=function(){var _ref10=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee10(identifier){var url,params;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee10$(_context10){while(1){switch(_context10.prev=_context10.next){case 0:url='/myproblems/record_detail.json';params={id:identifier};return _context10.abrupt('return',__WEBPACK_IMPORTED_MODULE_1_axios___default.a.get(url,{params:params}));case 3:case'end':return _context10.stop();}}},_callee10,this);}));return function fetchUserCommitRecordDetail(_x13){return _ref10.apply(this,arguments);};}();// 恢复初始代码 // export async function restoreInitialCode (identifier) { // const url = `/myproblems/${identifier}/restore_initial_code.json`; // return axios.get(url); // } // 发布任务 var publishTask=function(){var _ref11=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee11(identifier){var url;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee11$(_context11){while(1){switch(_context11.prev=_context11.next){case 0:url='/problems/'+identifier+'/publish.json';return _context11.abrupt('return',__WEBPACK_IMPORTED_MODULE_1_axios___default.a.post(url));case 2:case'end':return _context11.stop();}}},_callee11,this);}));return function publishTask(_x14){return _ref11.apply(this,arguments);};}();// 撤销发布 var cancelPublicTask=function(){var _ref12=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee12(identifier){var url;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee12$(_context12){while(1){switch(_context12.prev=_context12.next){case 0:url='/problems/'+identifier+'/cancel_publish.json';return _context12.abrupt('return',__WEBPACK_IMPORTED_MODULE_1_axios___default.a.post(url));case 2:case'end':return _context12.stop();}}},_callee12,this);}));return function cancelPublicTask(_x15){return _ref12.apply(this,arguments);};}();// 更新用户编辑代码 var fetchUpdateCode=function(){var _ref13=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee13(identifier,params){var url;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee13$(_context13){while(1){switch(_context13.prev=_context13.next){case 0:url='/myproblems/'+identifier+'/update_code.json';return _context13.abrupt('return',__WEBPACK_IMPORTED_MODULE_1_axios___default.a.post(url,params));case 2:case'end':return _context13.stop();}}},_callee13,this);}));return function fetchUpdateCode(_x16,_x17){return _ref13.apply(this,arguments);};}();// 用户提交代码 var fetchUserCodeSubmit=function(){var _ref14=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee14(identifier){var url;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee14$(_context14){while(1){switch(_context14.prev=_context14.next){case 0:url='/myproblems/'+identifier+'/code_submit.json';return _context14.abrupt('return',__WEBPACK_IMPORTED_MODULE_1_axios___default.a.get(url));case 2:case'end':return _context14.stop();}}},_callee14,this);}));return function fetchUserCodeSubmit(_x18){return _ref14.apply(this,arguments);};}();// 恢复初始代码 var fetchRestoreInitialCode=function(){var _ref15=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee15(identifier){var url;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee15$(_context15){while(1){switch(_context15.prev=_context15.next){case 0:// const url = `/myproblems/${identifier}/restore_initial_code.json`; url='/myproblems/'+identifier+'/sync_code.json';return _context15.abrupt('return',__WEBPACK_IMPORTED_MODULE_1_axios___default.a.post(url));case 2:case'end':return _context15.stop();}}},_callee15,this);}));return function fetchRestoreInitialCode(_x19){return _ref15.apply(this,arguments);};}();// 新建时调用获取用户信息接口 var fetchUserInfoForNew=function(){var _ref16=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee16(){var url;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee16$(_context16){while(1){switch(_context16.prev=_context16.next){case 0:url='/problems/new.json';return _context16.abrupt('return',__WEBPACK_IMPORTED_MODULE_1_axios___default.a.get(url));case 2:case'end':return _context16.stop();}}},_callee16,this);}));return function fetchUserInfoForNew(){return _ref16.apply(this,arguments);};}();// 文件上传 var fetchUploadImage=function(){var _ref17=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee17(file){var url;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee17$(_context17){while(1){switch(_context17.prev=_context17.next){case 0:url='/attachments.json';return _context17.abrupt('return',__WEBPACK_IMPORTED_MODULE_1_axios___default.a.post(url,file));case 2:case'end':return _context17.stop();}}},_callee17,this);}));return function fetchUploadImage(_x20){return _ref17.apply(this,arguments);};}();// 根据id号获取图片url var fetchUploadImageUrl=function(){var _ref18=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee18(id){var url;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee18$(_context18){while(1){switch(_context18.prev=_context18.next){case 0:url='/attachments/'+id;return _context18.abrupt('return',__WEBPACK_IMPORTED_MODULE_1_axios___default.a.get(url));case 2:case'end':return _context18.stop();}}},_callee18,this);}));return function fetchUploadImageUrl(_x21){return _ref18.apply(this,arguments);};}();// 添加笔记 var fetchAddNotes=function(){var _ref19=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee19(identifier,params){var url;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee19$(_context19){while(1){switch(_context19.prev=_context19.next){case 0:url='/myproblems/'+identifier+'/add_notes.json';return _context19.abrupt('return',__WEBPACK_IMPORTED_MODULE_1_axios___default.a.post(url,params));case 2:case'end':return _context19.stop();}}},_callee19,this);}));return function fetchAddNotes(_x22,_x23){return _ref19.apply(this,arguments);};}();// 获取课程体系 var fetchQuestion=function(){var _ref20=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee20(params){var url;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee20$(_context20){while(1){switch(_context20.prev=_context20.next){case 0:url='/disciplines.json';return _context20.abrupt('return',__WEBPACK_IMPORTED_MODULE_1_axios___default.a.get(url,{params:params}));case 2:case'end':return _context20.stop();}}},_callee20,this);}));return function fetchQuestion(_x24){return _ref20.apply(this,arguments);};}();// 新增选题 var fetchTagDisciplines=function(){var _ref21=_asyncToGenerator(/*#__PURE__*/__WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.mark(function _callee21(params){var url;return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_regenerator___default.a.wrap(function _callee21$(_context21){while(1){switch(_context21.prev=_context21.next){case 0:url='/tag_disciplines.json';return _context21.abrupt('return',__WEBPACK_IMPORTED_MODULE_1_axios___default.a.post(url,params));case 2:case'end':return _context21.stop();}}},_callee21,this);}));return function fetchTagDisciplines(_x25){return _ref21.apply(this,arguments);};}(); /***/ }), /* 95 */ /***/ (function(module, exports) { exports.f = {}.propertyIsEnumerable; /***/ }), /* 96 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var $at = __webpack_require__(481)(true); // 21.1.3.27 String.prototype[@@iterator]() __webpack_require__(146)(String, 'String', function (iterated) { this._t = String(iterated); // target this._i = 0; // next index // 21.1.5.2.1 %StringIteratorPrototype%.next() }, function () { var O = this._t; var index = this._i; var point; if (index >= O.length) return { value: undefined, done: true }; point = $at(O, index); this._i += point.length; return { value: point, done: false }; }); /***/ }), /* 97 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(2); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(9)); var _getPrototypeOf = _interopRequireDefault(__webpack_require__(22)); var _classCallCheck2 = _interopRequireDefault(__webpack_require__(17)); var _createClass2 = _interopRequireDefault(__webpack_require__(18)); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(23)); var _inherits2 = _interopRequireDefault(__webpack_require__(24)); var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(25)); var _react = _interopRequireDefault(__webpack_require__(0)); var _hoistNonReactStatics = _interopRequireDefault(__webpack_require__(154)); var _wrapDisplayName = _interopRequireDefault(__webpack_require__(124)); var _createMuiTheme = _interopRequireDefault(__webpack_require__(158)); var _themeListener = _interopRequireDefault(__webpack_require__(159)); var defaultTheme; function getDefaultTheme() { if (defaultTheme) { return defaultTheme; } defaultTheme = (0, _createMuiTheme.default)(); return defaultTheme; } // Provide the theme object as a property to the input component. var withTheme = function withTheme() { return function (Component) { var WithTheme = /*#__PURE__*/ function (_React$Component) { (0, _inherits2.default)(WithTheme, _React$Component); function WithTheme(props, context) { var _this; (0, _classCallCheck2.default)(this, WithTheme); _this = (0, _possibleConstructorReturn2.default)(this, (WithTheme.__proto__ || (0, _getPrototypeOf.default)(WithTheme)).call(this, props, context)); Object.defineProperty((0, _assertThisInitialized2.default)(_this), "state", { configurable: true, enumerable: true, writable: true, value: {} }); Object.defineProperty((0, _assertThisInitialized2.default)(_this), "unsubscribeId", { configurable: true, enumerable: true, writable: true, value: null }); _this.state = { // We use || as the function call is lazy evaluated. theme: _themeListener.default.initial(context) || getDefaultTheme() }; return _this; } (0, _createClass2.default)(WithTheme, [{ key: "componentDidMount", value: function componentDidMount() { var _this2 = this; this.unsubscribeId = _themeListener.default.subscribe(this.context, function (theme) { _this2.setState({ theme: theme }); }); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (this.unsubscribeId !== null) { _themeListener.default.unsubscribe(this.context, this.unsubscribeId); } } }, { key: "render", value: function render() { return _react.default.createElement(Component, (0, _extends2.default)({ theme: this.state.theme }, this.props)); } }]); return WithTheme; }(_react.default.Component); WithTheme.contextTypes = _themeListener.default.contextTypes; if (false) { WithTheme.displayName = (0, _wrapDisplayName.default)(Component, 'WithTheme'); } (0, _hoistNonReactStatics.default)(WithTheme, Component); if (false) { // Exposed for test purposes. WithTheme.Naked = Component; } return WithTheme; }; }; var _default = withTheme; exports.default = _default; /***/ }), /* 98 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(64); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(47); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /** * The public API for putting history on context. */ var Router = function (_React$Component) { _inherits(Router, _React$Component); function Router() { var _temp, _this, _ret; _classCallCheck(this, Router); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = { match: _this.computeMatch(_this.props.history.location.pathname) }, _temp), _possibleConstructorReturn(_this, _ret); } Router.prototype.getChildContext = function getChildContext() { return { router: _extends({}, this.context.router, { history: this.props.history, route: { location: this.props.history.location, match: this.state.match } }) }; }; Router.prototype.computeMatch = function computeMatch(pathname) { return { path: "/", url: "/", params: {}, isExact: pathname === "/" }; }; Router.prototype.componentWillMount = function componentWillMount() { var _this2 = this; var _props = this.props, children = _props.children, history = _props.history; __WEBPACK_IMPORTED_MODULE_1_invariant___default()(children == null || __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.count(children) === 1, "A may have only one child element"); // Do this here so we can setState when a changes the // location in componentWillMount. This happens e.g. when doing // server rendering using a . this.unlisten = history.listen(function () { _this2.setState({ match: _this2.computeMatch(history.location.pathname) }); }); }; Router.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { __WEBPACK_IMPORTED_MODULE_0_warning___default()(this.props.history === nextProps.history, "You cannot change "); }; Router.prototype.componentWillUnmount = function componentWillUnmount() { this.unlisten(); }; Router.prototype.render = function render() { var children = this.props.children; return children ? __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(children) : null; }; return Router; }(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component); Router.propTypes = { history: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired, children: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.node }; Router.contextTypes = { router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object }; Router.childContextTypes = { router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired }; /* harmony default export */ __webpack_exports__["a"] = (Router); /***/ }), /* 99 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(219); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__); var patternCache = {}; var cacheLimit = 10000; var cacheCount = 0; var compilePath = function compilePath(pattern, options) { var cacheKey = "" + options.end + options.strict + options.sensitive; var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {}); if (cache[pattern]) return cache[pattern]; var keys = []; var re = __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default()(pattern, keys, options); var compiledPattern = { re: re, keys: keys }; if (cacheCount < cacheLimit) { cache[pattern] = compiledPattern; cacheCount++; } return compiledPattern; }; /** * Public API for matching a URL pathname to a path pattern. */ var matchPath = function matchPath(pathname) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var parent = arguments[2]; if (typeof options === "string") options = { path: options }; var _options = options, path = _options.path, _options$exact = _options.exact, exact = _options$exact === undefined ? false : _options$exact, _options$strict = _options.strict, strict = _options$strict === undefined ? false : _options$strict, _options$sensitive = _options.sensitive, sensitive = _options$sensitive === undefined ? false : _options$sensitive; if (path == null) return parent; var _compilePath = compilePath(path, { end: exact, strict: strict, sensitive: sensitive }), re = _compilePath.re, keys = _compilePath.keys; var match = re.exec(pathname); if (!match) return null; var url = match[0], values = match.slice(1); var isExact = pathname === url; if (exact && !isExact) return null; return { path: path, // the path pattern used to match url: path === "/" && url === "" ? "/" : url, // the matched portion of the URL isExact: isExact, // whether or not we matched exactly params: keys.reduce(function (memo, key, index) { memo[key.name] = values[index]; return memo; }, {}) }; }; /* harmony default export */ __webpack_exports__["a"] = (matchPath); /***/ }), /* 100 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.15 ToLength var toInteger = __webpack_require__(141); var min = Math.min; module.exports = function (it) { return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; /***/ }), /* 101 */ /***/ (function(module, exports) { module.exports = true; /***/ }), /* 102 */ /***/ (function(module, exports) { var id = 0; var px = Math.random(); module.exports = function (key) { return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; /***/ }), /* 103 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(53); var dPs = __webpack_require__(483); var enumBugKeys = __webpack_require__(144); var IE_PROTO = __webpack_require__(142)('IE_PROTO'); var Empty = function () { /* empty */ }; var PROTOTYPE = 'prototype'; // Create object with fake `null` prototype: use iframe Object with cleared prototype var createDict = function () { // Thrash, waste and sodomy: IE GC bug var iframe = __webpack_require__(235)('iframe'); var i = enumBugKeys.length; var lt = '<'; var gt = '>'; var iframeDocument; iframe.style.display = 'none'; __webpack_require__(484).appendChild(iframe); iframe.src = 'javascript:'; // eslint-disable-line no-script-url // createDict = iframe.contentWindow.Object; // html.removeChild(iframe); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); iframeDocument.close(); createDict = iframeDocument.F; while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]]; return createDict(); }; module.exports = Object.create || function create(O, Properties) { var result; if (O !== null) { Empty[PROTOTYPE] = anObject(O); result = new Empty(); Empty[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = createDict(); return Properties === undefined ? result : dPs(result, Properties); }; /***/ }), /* 104 */ /***/ (function(module, exports, __webpack_require__) { var def = __webpack_require__(37).f; var has = __webpack_require__(57); var TAG = __webpack_require__(32)('toStringTag'); module.exports = function (it, tag, stat) { if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); }; /***/ }), /* 105 */ /***/ (function(module, exports, __webpack_require__) { var ctx = __webpack_require__(55); var call = __webpack_require__(255); var isArrayIter = __webpack_require__(256); var anObject = __webpack_require__(53); var toLength = __webpack_require__(100); var getIterFn = __webpack_require__(205); var BREAK = {}; var RETURN = {}; var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); var f = ctx(fn, that, entries ? 2 : 1); var index = 0; var length, step, iterator, result; if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); // fast case for arrays with default iterator if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); if (result === BREAK || result === RETURN) return result; } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { result = call(iterator, f, step.value, entries); if (result === BREAK || result === RETURN) return result; } }; exports.BREAK = BREAK; exports.RETURN = RETURN; /***/ }), /* 106 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports['default'] = toCssValue; var join = function join(value, by) { var result = ''; for (var i = 0; i < value.length; i++) { // Remove !important from the value, it will be readded later. if (value[i] === '!important') break; if (result) result += by; result += value[i]; } return result; }; /** * Converts array values to string. * * `margin: [['5px', '10px']]` > `margin: 5px 10px;` * `border: ['1px', '2px']` > `border: 1px, 2px;` * `margin: [['5px', '10px'], '!important']` > `margin: 5px 10px !important;` * `color: ['red', !important]` > `color: red !important;` */ function toCssValue(value) { var ignoreImportant = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; if (!Array.isArray(value)) return value; var cssValue = ''; // Support space separated values via `[['5px', '10px']]`. if (Array.isArray(value[0])) { for (var i = 0; i < value.length; i++) { if (value[i] === '!important') break; if (cssValue) cssValue += ', '; cssValue += join(value[i], ' '); } } else cssValue = join(value, ', '); // Add !important, because it was ignored. if (!ignoreImportant && value[value.length - 1] === '!important') { cssValue += ' !important'; } return cssValue; } /***/ }), /* 107 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports['default'] = createRule; var _warning = __webpack_require__(15); var _warning2 = _interopRequireDefault(_warning); var _StyleRule = __webpack_require__(67); var _StyleRule2 = _interopRequireDefault(_StyleRule); var _cloneStyle = __webpack_require__(546); var _cloneStyle2 = _interopRequireDefault(_cloneStyle); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Create a rule instance. */ function createRule() { var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'unnamed'; var decl = arguments[1]; var options = arguments[2]; var jss = options.jss; var declCopy = (0, _cloneStyle2['default'])(decl); var rule = jss.plugins.onCreateRule(name, declCopy, options); if (rule) return rule; // It is an at-rule and it has no instance. if (name[0] === '@') { (0, _warning2['default'])(false, '[JSS] Unknown at-rule %s', name); } return new _StyleRule2['default'](name, declCopy, options); } /***/ }), /* 108 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isBrowser", function() { return isBrowser; }); var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var isBrowser = (typeof window === "undefined" ? "undefined" : _typeof(window)) === "object" && (typeof document === "undefined" ? "undefined" : _typeof(document)) === 'object' && document.nodeType === 9; /* harmony default export */ __webpack_exports__["default"] = (isBrowser); /***/ }), /* 109 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); var isMergeableObject = function isMergeableObject(value) { return isNonNullObject(value) && !isSpecial(value) }; function isNonNullObject(value) { return !!value && typeof value === 'object' } function isSpecial(value) { var stringValue = Object.prototype.toString.call(value); return stringValue === '[object RegExp]' || stringValue === '[object Date]' || isReactElement(value) } // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25 var canUseSymbol = typeof Symbol === 'function' && Symbol.for; var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7; function isReactElement(value) { return value.$$typeof === REACT_ELEMENT_TYPE } function emptyTarget(val) { return Array.isArray(val) ? [] : {} } function cloneUnlessOtherwiseSpecified(value, options) { return (options.clone !== false && options.isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, options) : value } function defaultArrayMerge(target, source, options) { return target.concat(source).map(function(element) { return cloneUnlessOtherwiseSpecified(element, options) }) } function mergeObject(target, source, options) { var destination = {}; if (options.isMergeableObject(target)) { Object.keys(target).forEach(function(key) { destination[key] = cloneUnlessOtherwiseSpecified(target[key], options); }); } Object.keys(source).forEach(function(key) { if (!options.isMergeableObject(source[key]) || !target[key]) { destination[key] = cloneUnlessOtherwiseSpecified(source[key], options); } else { destination[key] = deepmerge(target[key], source[key], options); } }); return destination } function deepmerge(target, source, options) { options = options || {}; options.arrayMerge = options.arrayMerge || defaultArrayMerge; options.isMergeableObject = options.isMergeableObject || isMergeableObject; var sourceIsArray = Array.isArray(source); var targetIsArray = Array.isArray(target); var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray; if (!sourceAndTargetTypesMatch) { return cloneUnlessOtherwiseSpecified(source, options) } else if (sourceIsArray) { return options.arrayMerge(target, source, options) } else { return mergeObject(target, source, options) } } deepmerge.all = function deepmergeAll(array, options) { if (!Array.isArray(array)) { throw new Error('first argument should be an array') } return array.reduce(function(prev, next) { return deepmerge(prev, next, options) }, {}) }; var deepmerge_1 = deepmerge; /* harmony default export */ __webpack_exports__["default"] = (deepmerge_1); /***/ }), /* 110 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = void 0; var _default = !!(typeof window !== 'undefined' && window.document && window.document.createElement); exports.default = _default; module.exports = exports["default"]; /***/ }), /* 111 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /** * @ignore * some key-codes definition and utils from closure-library * @author yiminghe@gmail.com */ var KeyCode = { /** * MAC_ENTER */ MAC_ENTER: 3, /** * BACKSPACE */ BACKSPACE: 8, /** * TAB */ TAB: 9, /** * NUMLOCK on FF/Safari Mac */ NUM_CENTER: 12, /** * ENTER */ ENTER: 13, /** * SHIFT */ SHIFT: 16, /** * CTRL */ CTRL: 17, /** * ALT */ ALT: 18, /** * PAUSE */ PAUSE: 19, /** * CAPS_LOCK */ CAPS_LOCK: 20, /** * ESC */ ESC: 27, /** * SPACE */ SPACE: 32, /** * PAGE_UP */ PAGE_UP: 33, /** * PAGE_DOWN */ PAGE_DOWN: 34, /** * END */ END: 35, /** * HOME */ HOME: 36, /** * LEFT */ LEFT: 37, /** * UP */ UP: 38, /** * RIGHT */ RIGHT: 39, /** * DOWN */ DOWN: 40, /** * PRINT_SCREEN */ PRINT_SCREEN: 44, /** * INSERT */ INSERT: 45, /** * DELETE */ DELETE: 46, /** * ZERO */ ZERO: 48, /** * ONE */ ONE: 49, /** * TWO */ TWO: 50, /** * THREE */ THREE: 51, /** * FOUR */ FOUR: 52, /** * FIVE */ FIVE: 53, /** * SIX */ SIX: 54, /** * SEVEN */ SEVEN: 55, /** * EIGHT */ EIGHT: 56, /** * NINE */ NINE: 57, /** * QUESTION_MARK */ QUESTION_MARK: 63, /** * A */ A: 65, /** * B */ B: 66, /** * C */ C: 67, /** * D */ D: 68, /** * E */ E: 69, /** * F */ F: 70, /** * G */ G: 71, /** * H */ H: 72, /** * I */ I: 73, /** * J */ J: 74, /** * K */ K: 75, /** * L */ L: 76, /** * M */ M: 77, /** * N */ N: 78, /** * O */ O: 79, /** * P */ P: 80, /** * Q */ Q: 81, /** * R */ R: 82, /** * S */ S: 83, /** * T */ T: 84, /** * U */ U: 85, /** * V */ V: 86, /** * W */ W: 87, /** * X */ X: 88, /** * Y */ Y: 89, /** * Z */ Z: 90, /** * META */ META: 91, /** * WIN_KEY_RIGHT */ WIN_KEY_RIGHT: 92, /** * CONTEXT_MENU */ CONTEXT_MENU: 93, /** * NUM_ZERO */ NUM_ZERO: 96, /** * NUM_ONE */ NUM_ONE: 97, /** * NUM_TWO */ NUM_TWO: 98, /** * NUM_THREE */ NUM_THREE: 99, /** * NUM_FOUR */ NUM_FOUR: 100, /** * NUM_FIVE */ NUM_FIVE: 101, /** * NUM_SIX */ NUM_SIX: 102, /** * NUM_SEVEN */ NUM_SEVEN: 103, /** * NUM_EIGHT */ NUM_EIGHT: 104, /** * NUM_NINE */ NUM_NINE: 105, /** * NUM_MULTIPLY */ NUM_MULTIPLY: 106, /** * NUM_PLUS */ NUM_PLUS: 107, /** * NUM_MINUS */ NUM_MINUS: 109, /** * NUM_PERIOD */ NUM_PERIOD: 110, /** * NUM_DIVISION */ NUM_DIVISION: 111, /** * F1 */ F1: 112, /** * F2 */ F2: 113, /** * F3 */ F3: 114, /** * F4 */ F4: 115, /** * F5 */ F5: 116, /** * F6 */ F6: 117, /** * F7 */ F7: 118, /** * F8 */ F8: 119, /** * F9 */ F9: 120, /** * F10 */ F10: 121, /** * F11 */ F11: 122, /** * F12 */ F12: 123, /** * NUMLOCK */ NUMLOCK: 144, /** * SEMICOLON */ SEMICOLON: 186, /** * DASH */ DASH: 189, /** * EQUALS */ EQUALS: 187, /** * COMMA */ COMMA: 188, /** * PERIOD */ PERIOD: 190, /** * SLASH */ SLASH: 191, /** * APOSTROPHE */ APOSTROPHE: 192, /** * SINGLE_QUOTE */ SINGLE_QUOTE: 222, /** * OPEN_SQUARE_BRACKET */ OPEN_SQUARE_BRACKET: 219, /** * BACKSLASH */ BACKSLASH: 220, /** * CLOSE_SQUARE_BRACKET */ CLOSE_SQUARE_BRACKET: 221, /** * WIN_KEY */ WIN_KEY: 224, /** * MAC_FF_META */ MAC_FF_META: 224, /** * WIN_IME */ WIN_IME: 229, // ======================== Function ======================== /** * whether text and modified key is entered at the same time. */ isTextModifyingKeyEvent: function isTextModifyingKeyEvent(e) { var keyCode = e.keyCode; if (e.altKey && !e.ctrlKey || e.metaKey || // Function keys don't generate text keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) { return false; } // The following keys are quite harmless, even in combination with // CTRL, ALT or SHIFT. switch (keyCode) { case KeyCode.ALT: case KeyCode.CAPS_LOCK: case KeyCode.CONTEXT_MENU: case KeyCode.CTRL: case KeyCode.DOWN: case KeyCode.END: case KeyCode.ESC: case KeyCode.HOME: case KeyCode.INSERT: case KeyCode.LEFT: case KeyCode.MAC_FF_META: case KeyCode.META: case KeyCode.NUMLOCK: case KeyCode.NUM_CENTER: case KeyCode.PAGE_DOWN: case KeyCode.PAGE_UP: case KeyCode.PAUSE: case KeyCode.PRINT_SCREEN: case KeyCode.RIGHT: case KeyCode.SHIFT: case KeyCode.UP: case KeyCode.WIN_KEY: case KeyCode.WIN_KEY_RIGHT: return false; default: return true; } }, /** * whether character is entered. */ isCharacterKey: function isCharacterKey(keyCode) { if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) { return true; } if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) { return true; } if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) { return true; } // Safari sends zero key code for non-latin characters. if (window.navigator.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) { return true; } switch (keyCode) { case KeyCode.SPACE: case KeyCode.QUESTION_MARK: case KeyCode.NUM_PLUS: case KeyCode.NUM_MINUS: case KeyCode.NUM_PERIOD: case KeyCode.NUM_DIVISION: case KeyCode.SEMICOLON: case KeyCode.DASH: case KeyCode.EQUALS: case KeyCode.COMMA: case KeyCode.PERIOD: case KeyCode.SLASH: case KeyCode.APOSTROPHE: case KeyCode.SINGLE_QUOTE: case KeyCode.OPEN_SQUARE_BRACKET: case KeyCode.BACKSLASH: case KeyCode.CLOSE_SQUARE_BRACKET: return true; default: return false; } } }; /* harmony default export */ __webpack_exports__["a"] = (KeyCode); /***/ }), /* 112 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DEPRECATED_CONFIG_PROPS = exports.defaultProps = exports.propTypes = void 0; var _propTypes = _interopRequireDefault(__webpack_require__(1)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var string = _propTypes["default"].string, bool = _propTypes["default"].bool, number = _propTypes["default"].number, array = _propTypes["default"].array, oneOfType = _propTypes["default"].oneOfType, shape = _propTypes["default"].shape, object = _propTypes["default"].object, func = _propTypes["default"].func, node = _propTypes["default"].node; var propTypes = { url: oneOfType([string, array, object]), playing: bool, loop: bool, controls: bool, volume: number, muted: bool, playbackRate: number, width: oneOfType([string, number]), height: oneOfType([string, number]), style: object, progressInterval: number, playsinline: bool, pip: bool, light: oneOfType([bool, string]), playIcon: node, wrapper: oneOfType([string, func, shape({ render: func.isRequired })]), config: shape({ soundcloud: shape({ options: object, preload: bool }), youtube: shape({ playerVars: object, embedOptions: object, preload: bool }), facebook: shape({ appId: string, version: string, playerId: string }), dailymotion: shape({ params: object, preload: bool }), vimeo: shape({ playerOptions: object, preload: bool }), file: shape({ attributes: object, tracks: array, forceVideo: bool, forceAudio: bool, forceHLS: bool, forceDASH: bool, hlsOptions: object, hlsVersion: string, dashVersion: string }), wistia: shape({ options: object }), mixcloud: shape({ options: object }), twitch: shape({ options: object, playerId: string }) }), onReady: func, onStart: func, onPlay: func, onPause: func, onBuffer: func, onBufferEnd: func, onEnded: func, onError: func, onDuration: func, onSeek: func, onProgress: func, onEnablePIP: func, onDisablePIP: func }; exports.propTypes = propTypes; var defaultProps = { playing: false, loop: false, controls: false, volume: null, muted: false, playbackRate: 1, width: '640px', height: '360px', style: {}, progressInterval: 1000, playsinline: false, pip: false, light: false, wrapper: 'div', config: { soundcloud: { options: { visual: true, // Undocumented, but makes player fill container and look better buying: false, liking: false, download: false, sharing: false, show_comments: false, show_playcount: false } }, youtube: { playerVars: { playsinline: 1, showinfo: 0, rel: 0, iv_load_policy: 3, modestbranding: 1 }, embedOptions: {}, preload: false }, facebook: { appId: '1309697205772819', version: 'v3.3', playerId: null }, dailymotion: { params: { api: 1, 'endscreen-enable': false }, preload: false }, vimeo: { playerOptions: { autopause: false, byline: false, portrait: false, title: false }, preload: false }, file: { attributes: {}, tracks: [], forceVideo: false, forceAudio: false, forceHLS: false, forceDASH: false, hlsOptions: {}, hlsVersion: '0.13.1', dashVersion: '2.9.2' }, wistia: { options: {} }, mixcloud: { options: { hide_cover: 1 } }, twitch: { options: {}, playerId: null } }, onReady: function onReady() {}, onStart: function onStart() {}, onPlay: function onPlay() {}, onPause: function onPause() {}, onBuffer: function onBuffer() {}, onBufferEnd: function onBufferEnd() {}, onEnded: function onEnded() {}, onError: function onError() {}, onDuration: function onDuration() {}, onSeek: function onSeek() {}, onProgress: function onProgress() {}, onEnablePIP: function onEnablePIP() {}, onDisablePIP: function onDisablePIP() {} }; exports.defaultProps = defaultProps; var DEPRECATED_CONFIG_PROPS = ['soundcloudConfig', 'youtubeConfig', 'facebookConfig', 'dailymotionConfig', 'vimeoConfig', 'fileConfig', 'wistiaConfig']; exports.DEPRECATED_CONFIG_PROPS = DEPRECATED_CONFIG_PROPS; /***/ }), /* 113 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* * base64.js * * Licensed under the BSD 3-Clause License. * http://opensource.org/licenses/BSD-3-Clause * * References: * http://en.wikipedia.org/wiki/Base64 */ ;(function (global, factory) { true ? module.exports = factory(global) : typeof define === 'function' && define.amd ? define(factory) : factory(global) }(( typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : this ), function(global) { 'use strict'; // existing version for noConflict() global = global || {}; var _Base64 = global.Base64; var version = "2.5.1"; // if node.js and NOT React Native, we use Buffer var buffer; if (typeof module !== 'undefined' && module.exports) { try { buffer = eval("require('buffer').Buffer"); } catch (err) { buffer = undefined; } } // constants var b64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; var b64tab = function(bin) { var t = {}; for (var i = 0, l = bin.length; i < l; i++) t[bin.charAt(i)] = i; return t; }(b64chars); var fromCharCode = String.fromCharCode; // encoder stuff var cb_utob = function(c) { if (c.length < 2) { var cc = c.charCodeAt(0); return cc < 0x80 ? c : cc < 0x800 ? (fromCharCode(0xc0 | (cc >>> 6)) + fromCharCode(0x80 | (cc & 0x3f))) : (fromCharCode(0xe0 | ((cc >>> 12) & 0x0f)) + fromCharCode(0x80 | ((cc >>> 6) & 0x3f)) + fromCharCode(0x80 | ( cc & 0x3f))); } else { var cc = 0x10000 + (c.charCodeAt(0) - 0xD800) * 0x400 + (c.charCodeAt(1) - 0xDC00); return (fromCharCode(0xf0 | ((cc >>> 18) & 0x07)) + fromCharCode(0x80 | ((cc >>> 12) & 0x3f)) + fromCharCode(0x80 | ((cc >>> 6) & 0x3f)) + fromCharCode(0x80 | ( cc & 0x3f))); } }; var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g; var utob = function(u) { return u.replace(re_utob, cb_utob); }; var cb_encode = function(ccc) { var padlen = [0, 2, 1][ccc.length % 3], ord = ccc.charCodeAt(0) << 16 | ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8) | ((ccc.length > 2 ? ccc.charCodeAt(2) : 0)), chars = [ b64chars.charAt( ord >>> 18), b64chars.charAt((ord >>> 12) & 63), padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63), padlen >= 1 ? '=' : b64chars.charAt(ord & 63) ]; return chars.join(''); }; var btoa = global.btoa ? function(b) { return global.btoa(b); } : function(b) { return b.replace(/[\s\S]{1,3}/g, cb_encode); }; var _encode = buffer ? buffer.from && Uint8Array && buffer.from !== Uint8Array.from ? function (u) { return (u.constructor === buffer.constructor ? u : buffer.from(u)) .toString('base64') } : function (u) { return (u.constructor === buffer.constructor ? u : new buffer(u)) .toString('base64') } : function (u) { return btoa(utob(u)) } ; var encode = function(u, urisafe) { return !urisafe ? _encode(String(u)) : _encode(String(u)).replace(/[+\/]/g, function(m0) { return m0 == '+' ? '-' : '_'; }).replace(/=/g, ''); }; var encodeURI = function(u) { return encode(u, true) }; // decoder stuff var re_btou = new RegExp([ '[\xC0-\xDF][\x80-\xBF]', '[\xE0-\xEF][\x80-\xBF]{2}', '[\xF0-\xF7][\x80-\xBF]{3}' ].join('|'), 'g'); var cb_btou = function(cccc) { switch(cccc.length) { case 4: var cp = ((0x07 & cccc.charCodeAt(0)) << 18) | ((0x3f & cccc.charCodeAt(1)) << 12) | ((0x3f & cccc.charCodeAt(2)) << 6) | (0x3f & cccc.charCodeAt(3)), offset = cp - 0x10000; return (fromCharCode((offset >>> 10) + 0xD800) + fromCharCode((offset & 0x3FF) + 0xDC00)); case 3: return fromCharCode( ((0x0f & cccc.charCodeAt(0)) << 12) | ((0x3f & cccc.charCodeAt(1)) << 6) | (0x3f & cccc.charCodeAt(2)) ); default: return fromCharCode( ((0x1f & cccc.charCodeAt(0)) << 6) | (0x3f & cccc.charCodeAt(1)) ); } }; var btou = function(b) { return b.replace(re_btou, cb_btou); }; var cb_decode = function(cccc) { var len = cccc.length, padlen = len % 4, n = (len > 0 ? b64tab[cccc.charAt(0)] << 18 : 0) | (len > 1 ? b64tab[cccc.charAt(1)] << 12 : 0) | (len > 2 ? b64tab[cccc.charAt(2)] << 6 : 0) | (len > 3 ? b64tab[cccc.charAt(3)] : 0), chars = [ fromCharCode( n >>> 16), fromCharCode((n >>> 8) & 0xff), fromCharCode( n & 0xff) ]; chars.length -= [0, 0, 2, 1][padlen]; return chars.join(''); }; var _atob = global.atob ? function(a) { return global.atob(a); } : function(a){ return a.replace(/\S{1,4}/g, cb_decode); }; var atob = function(a) { return _atob(String(a).replace(/[^A-Za-z0-9\+\/]/g, '')); }; var _decode = buffer ? buffer.from && Uint8Array && buffer.from !== Uint8Array.from ? function(a) { return (a.constructor === buffer.constructor ? a : buffer.from(a, 'base64')).toString(); } : function(a) { return (a.constructor === buffer.constructor ? a : new buffer(a, 'base64')).toString(); } : function(a) { return btou(_atob(a)) }; var decode = function(a){ return _decode( String(a).replace(/[-_]/g, function(m0) { return m0 == '-' ? '+' : '/' }) .replace(/[^A-Za-z0-9\+\/]/g, '') ); }; var noConflict = function() { var Base64 = global.Base64; global.Base64 = _Base64; return Base64; }; // export Base64 global.Base64 = { VERSION: version, atob: atob, btoa: btoa, fromBase64: decode, toBase64: encode, utob: utob, encode: encode, encodeURI: encodeURI, btou: btou, decode: decode, noConflict: noConflict, __buffer__: buffer }; // if ES5 is available, make Base64.extendString() available if (typeof Object.defineProperty === 'function') { var noEnum = function(v){ return {value:v,enumerable:false,writable:true,configurable:true}; }; global.Base64.extendString = function () { Object.defineProperty( String.prototype, 'fromBase64', noEnum(function () { return decode(this) })); Object.defineProperty( String.prototype, 'toBase64', noEnum(function (urisafe) { return encode(this, urisafe) })); Object.defineProperty( String.prototype, 'toBase64URI', noEnum(function () { return encode(this, true) })); }; } // // export Base64 to the namespace // if (global['Meteor']) { // Meteor.js Base64 = global.Base64; } // module.exports and AMD are mutually exclusive. // module.exports has precedence. if (typeof module !== 'undefined' && module.exports) { module.exports.Base64 = global.Base64; } else if (true) { // AMD. Register as an anonymous module. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function(){ return global.Base64 }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } // that's it! return {Base64: global.Base64} })); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(35))) /***/ }), /* 114 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(31); __webpack_require__(837); //# sourceMappingURL=css.js.map /***/ }), /* 115 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _rcNotification = _interopRequireDefault(__webpack_require__(230)); var _icon = _interopRequireDefault(__webpack_require__(27)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } var defaultDuration = 3; var defaultTop; var messageInstance; var key = 1; var prefixCls = 'ant-message'; var transitionName = 'move-up'; var getContainer; var maxCount; function getMessageInstance(callback) { if (messageInstance) { callback(messageInstance); return; } _rcNotification["default"].newInstance({ prefixCls: prefixCls, transitionName: transitionName, style: { top: defaultTop }, getContainer: getContainer, maxCount: maxCount }, function (instance) { if (messageInstance) { callback(messageInstance); return; } messageInstance = instance; callback(instance); }); } function notice(args) { var duration = args.duration !== undefined ? args.duration : defaultDuration; var iconType = { info: 'info-circle', success: 'check-circle', error: 'close-circle', warning: 'exclamation-circle', loading: 'loading' }[args.type]; var target = args.key || key++; var closePromise = new Promise(function (resolve) { var callback = function callback() { if (typeof args.onClose === 'function') { args.onClose(); } return resolve(true); }; getMessageInstance(function (instance) { var iconNode = React.createElement(_icon["default"], { type: iconType, theme: iconType === 'loading' ? 'outlined' : 'filled' }); var switchIconNode = iconType ? iconNode : ''; instance.notice({ key: target, duration: duration, style: {}, content: React.createElement("div", { className: "".concat(prefixCls, "-custom-content").concat(args.type ? " ".concat(prefixCls, "-").concat(args.type) : '') }, args.icon ? args.icon : switchIconNode, React.createElement("span", null, args.content)), onClose: callback }); }); }); var result = function result() { if (messageInstance) { messageInstance.removeNotice(target); } }; result.then = function (filled, rejected) { return closePromise.then(filled, rejected); }; result.promise = closePromise; return result; } function isArgsProps(content) { return Object.prototype.toString.call(content) === '[object Object]' && !!content.content; } var api = { open: notice, config: function config(options) { if (options.top !== undefined) { defaultTop = options.top; messageInstance = null; // delete messageInstance for new defaultTop } if (options.duration !== undefined) { defaultDuration = options.duration; } if (options.prefixCls !== undefined) { prefixCls = options.prefixCls; } if (options.getContainer !== undefined) { getContainer = options.getContainer; } if (options.transitionName !== undefined) { transitionName = options.transitionName; messageInstance = null; // delete messageInstance for new transitionName } if (options.maxCount !== undefined) { maxCount = options.maxCount; messageInstance = null; } }, destroy: function destroy() { if (messageInstance) { messageInstance.destroy(); messageInstance = null; } } }; ['success', 'info', 'warning', 'error', 'loading'].forEach(function (type) { api[type] = function (content, duration, onClose) { if (isArgsProps(content)) { return api.open(_extends(_extends({}, content), { type: type })); } if (typeof duration === 'function') { onClose = duration; duration = undefined; } return api.open({ content: content, duration: duration, type: type, onClose: onClose }); }; }); api.warn = api.warning; var _default = api; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 116 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(2); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _Typography.default; } }); var _Typography = _interopRequireDefault(__webpack_require__(621)); /***/ }), /* 117 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(2); Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function get() { return _Dialog.default; } }); Object.defineProperty(exports, "DialogActions", { enumerable: true, get: function get() { return _DialogActions.default; } }); Object.defineProperty(exports, "DialogTitle", { enumerable: true, get: function get() { return _DialogTitle.default; } }); Object.defineProperty(exports, "DialogContent", { enumerable: true, get: function get() { return _DialogContent.default; } }); Object.defineProperty(exports, "DialogContentText", { enumerable: true, get: function get() { return _DialogContentText.default; } }); Object.defineProperty(exports, "withMobileDialog", { enumerable: true, get: function get() { return _withMobileDialog.default; } }); var _Dialog = _interopRequireDefault(__webpack_require__(510)); var _DialogActions = _interopRequireDefault(__webpack_require__(601)); var _DialogTitle = _interopRequireDefault(__webpack_require__(620)); var _DialogContent = _interopRequireDefault(__webpack_require__(622)); var _DialogContentText = _interopRequireDefault(__webpack_require__(623)); var _withMobileDialog = _interopRequireDefault(__webpack_require__(624)); /***/ }), /* 118 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return createStore; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return combineReducers; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return bindActionCreators; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return applyMiddleware; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return compose; }); /* unused harmony export __DO_NOT_USE__ActionTypes */ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_symbol_observable__ = __webpack_require__(209); /** * These are private action types reserved by Redux. * For any unknown actions, you must return the current state. * If the current state is undefined, you must return the initial state. * Do not reference these action types directly in your code. */ var randomString = function randomString() { return Math.random().toString(36).substring(7).split('').join('.'); }; var ActionTypes = { INIT: "@@redux/INIT" + randomString(), REPLACE: "@@redux/REPLACE" + randomString(), PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() { return "@@redux/PROBE_UNKNOWN_ACTION" + randomString(); } }; /** * @param {any} obj The object to inspect. * @returns {boolean} True if the argument appears to be a plain object. */ function isPlainObject(obj) { if (typeof obj !== 'object' || obj === null) return false; var proto = obj; while (Object.getPrototypeOf(proto) !== null) { proto = Object.getPrototypeOf(proto); } return Object.getPrototypeOf(obj) === proto; } /** * Creates a Redux store that holds the state tree. * The only way to change the data in the store is to call `dispatch()` on it. * * There should only be a single store in your app. To specify how different * parts of the state tree respond to actions, you may combine several reducers * into a single reducer function by using `combineReducers`. * * @param {Function} reducer A function that returns the next state tree, given * the current state tree and the action to handle. * * @param {any} [preloadedState] The initial state. You may optionally specify it * to hydrate the state from the server in universal apps, or to restore a * previously serialized user session. * If you use `combineReducers` to produce the root reducer function, this must be * an object with the same shape as `combineReducers` keys. * * @param {Function} [enhancer] The store enhancer. You may optionally specify it * to enhance the store with third-party capabilities such as middleware, * time travel, persistence, etc. The only store enhancer that ships with Redux * is `applyMiddleware()`. * * @returns {Store} A Redux store that lets you read the state, dispatch actions * and subscribe to changes. */ function createStore(reducer, preloadedState, enhancer) { var _ref2; if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') { throw new Error('It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function'); } if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { enhancer = preloadedState; preloadedState = undefined; } if (typeof enhancer !== 'undefined') { if (typeof enhancer !== 'function') { throw new Error('Expected the enhancer to be a function.'); } return enhancer(createStore)(reducer, preloadedState); } if (typeof reducer !== 'function') { throw new Error('Expected the reducer to be a function.'); } var currentReducer = reducer; var currentState = preloadedState; var currentListeners = []; var nextListeners = currentListeners; var isDispatching = false; function ensureCanMutateNextListeners() { if (nextListeners === currentListeners) { nextListeners = currentListeners.slice(); } } /** * Reads the state tree managed by the store. * * @returns {any} The current state tree of your application. */ function getState() { if (isDispatching) { throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.'); } return currentState; } /** * Adds a change listener. It will be called any time an action is dispatched, * and some part of the state tree may potentially have changed. You may then * call `getState()` to read the current state tree inside the callback. * * You may call `dispatch()` from a change listener, with the following * caveats: * * 1. The subscriptions are snapshotted just before every `dispatch()` call. * If you subscribe or unsubscribe while the listeners are being invoked, this * will not have any effect on the `dispatch()` that is currently in progress. * However, the next `dispatch()` call, whether nested or not, will use a more * recent snapshot of the subscription list. * * 2. The listener should not expect to see all state changes, as the state * might have been updated multiple times during a nested `dispatch()` before * the listener is called. It is, however, guaranteed that all subscribers * registered before the `dispatch()` started will be called with the latest * state by the time it exits. * * @param {Function} listener A callback to be invoked on every dispatch. * @returns {Function} A function to remove this change listener. */ function subscribe(listener) { if (typeof listener !== 'function') { throw new Error('Expected the listener to be a function.'); } if (isDispatching) { throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.'); } var isSubscribed = true; ensureCanMutateNextListeners(); nextListeners.push(listener); return function unsubscribe() { if (!isSubscribed) { return; } if (isDispatching) { throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.'); } isSubscribed = false; ensureCanMutateNextListeners(); var index = nextListeners.indexOf(listener); nextListeners.splice(index, 1); }; } /** * Dispatches an action. It is the only way to trigger a state change. * * The `reducer` function, used to create the store, will be called with the * current state tree and the given `action`. Its return value will * be considered the **next** state of the tree, and the change listeners * will be notified. * * The base implementation only supports plain object actions. If you want to * dispatch a Promise, an Observable, a thunk, or something else, you need to * wrap your store creating function into the corresponding middleware. For * example, see the documentation for the `redux-thunk` package. Even the * middleware will eventually dispatch plain object actions using this method. * * @param {Object} action A plain object representing “what changed”. It is * a good idea to keep actions serializable so you can record and replay user * sessions, or use the time travelling `redux-devtools`. An action must have * a `type` property which may not be `undefined`. It is a good idea to use * string constants for action types. * * @returns {Object} For convenience, the same action object you dispatched. * * Note that, if you use a custom middleware, it may wrap `dispatch()` to * return something else (for example, a Promise you can await). */ function dispatch(action) { if (!isPlainObject(action)) { throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.'); } if (typeof action.type === 'undefined') { throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?'); } if (isDispatching) { throw new Error('Reducers may not dispatch actions.'); } try { isDispatching = true; currentState = currentReducer(currentState, action); } finally { isDispatching = false; } var listeners = currentListeners = nextListeners; for (var i = 0; i < listeners.length; i++) { var listener = listeners[i]; listener(); } return action; } /** * Replaces the reducer currently used by the store to calculate the state. * * You might need this if your app implements code splitting and you want to * load some of the reducers dynamically. You might also need this if you * implement a hot reloading mechanism for Redux. * * @param {Function} nextReducer The reducer for the store to use instead. * @returns {void} */ function replaceReducer(nextReducer) { if (typeof nextReducer !== 'function') { throw new Error('Expected the nextReducer to be a function.'); } currentReducer = nextReducer; dispatch({ type: ActionTypes.REPLACE }); } /** * Interoperability point for observable/reactive libraries. * @returns {observable} A minimal observable of state changes. * For more information, see the observable proposal: * https://github.com/tc39/proposal-observable */ function observable() { var _ref; var outerSubscribe = subscribe; return _ref = { /** * The minimal observable subscription method. * @param {Object} observer Any object that can be used as an observer. * The observer object should have a `next` method. * @returns {subscription} An object with an `unsubscribe` method that can * be used to unsubscribe the observable from the store, and prevent further * emission of values from the observable. */ subscribe: function subscribe(observer) { if (typeof observer !== 'object' || observer === null) { throw new TypeError('Expected the observer to be an object.'); } function observeState() { if (observer.next) { observer.next(getState()); } } observeState(); var unsubscribe = outerSubscribe(observeState); return { unsubscribe: unsubscribe }; } }, _ref[__WEBPACK_IMPORTED_MODULE_0_symbol_observable__["default"]] = function () { return this; }, _ref; } // When a store is created, an "INIT" action is dispatched so that every // reducer returns their initial state. This effectively populates // the initial state tree. dispatch({ type: ActionTypes.INIT }); return _ref2 = { dispatch: dispatch, subscribe: subscribe, getState: getState, replaceReducer: replaceReducer }, _ref2[__WEBPACK_IMPORTED_MODULE_0_symbol_observable__["default"]] = observable, _ref2; } /** * Prints a warning in the console if it exists. * * @param {String} message The warning message. * @returns {void} */ function warning(message) { /* eslint-disable no-console */ if (typeof console !== 'undefined' && typeof console.error === 'function') { console.error(message); } /* eslint-enable no-console */ try { // This error was thrown as a convenience so that if you enable // "break on all exceptions" in your console, // it would pause the execution at this line. throw new Error(message); } catch (e) {} // eslint-disable-line no-empty } function getUndefinedStateErrorMessage(key, action) { var actionType = action && action.type; var actionDescription = actionType && "action \"" + String(actionType) + "\"" || 'an action'; return "Given " + actionDescription + ", reducer \"" + key + "\" returned undefined. " + "To ignore an action, you must explicitly return the previous state. " + "If you want this reducer to hold no value, you can return null instead of undefined."; } function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { var reducerKeys = Object.keys(reducers); var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; if (reducerKeys.length === 0) { return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; } if (!isPlainObject(inputState)) { return "The " + argumentName + " has unexpected type of \"" + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\""); } var unexpectedKeys = Object.keys(inputState).filter(function (key) { return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; }); unexpectedKeys.forEach(function (key) { unexpectedKeyCache[key] = true; }); if (action && action.type === ActionTypes.REPLACE) return; if (unexpectedKeys.length > 0) { return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored."); } } function assertReducerShape(reducers) { Object.keys(reducers).forEach(function (key) { var reducer = reducers[key]; var initialState = reducer(undefined, { type: ActionTypes.INIT }); if (typeof initialState === 'undefined') { throw new Error("Reducer \"" + key + "\" returned undefined during initialization. " + "If the state passed to the reducer is undefined, you must " + "explicitly return the initial state. The initial state may " + "not be undefined. If you don't want to set a value for this reducer, " + "you can use null instead of undefined."); } if (typeof reducer(undefined, { type: ActionTypes.PROBE_UNKNOWN_ACTION() }) === 'undefined') { throw new Error("Reducer \"" + key + "\" returned undefined when probed with a random type. " + ("Don't try to handle " + ActionTypes.INIT + " or other actions in \"redux/*\" ") + "namespace. They are considered private. Instead, you must return the " + "current state for any unknown actions, unless it is undefined, " + "in which case you must return the initial state, regardless of the " + "action type. The initial state may not be undefined, but can be null."); } }); } /** * Turns an object whose values are different reducer functions, into a single * reducer function. It will call every child reducer, and gather their results * into a single state object, whose keys correspond to the keys of the passed * reducer functions. * * @param {Object} reducers An object whose values correspond to different * reducer functions that need to be combined into one. One handy way to obtain * it is to use ES6 `import * as reducers` syntax. The reducers may never return * undefined for any action. Instead, they should return their initial state * if the state passed to them was undefined, and the current state for any * unrecognized action. * * @returns {Function} A reducer function that invokes every reducer inside the * passed object, and builds a state object with the same shape. */ function combineReducers(reducers) { var reducerKeys = Object.keys(reducers); var finalReducers = {}; for (var i = 0; i < reducerKeys.length; i++) { var key = reducerKeys[i]; if (false) { if (typeof reducers[key] === 'undefined') { warning("No reducer provided for key \"" + key + "\""); } } if (typeof reducers[key] === 'function') { finalReducers[key] = reducers[key]; } } var finalReducerKeys = Object.keys(finalReducers); var unexpectedKeyCache; if (false) { unexpectedKeyCache = {}; } var shapeAssertionError; try { assertReducerShape(finalReducers); } catch (e) { shapeAssertionError = e; } return function combination(state, action) { if (state === void 0) { state = {}; } if (shapeAssertionError) { throw shapeAssertionError; } if (false) { var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache); if (warningMessage) { warning(warningMessage); } } var hasChanged = false; var nextState = {}; for (var _i = 0; _i < finalReducerKeys.length; _i++) { var _key = finalReducerKeys[_i]; var reducer = finalReducers[_key]; var previousStateForKey = state[_key]; var nextStateForKey = reducer(previousStateForKey, action); if (typeof nextStateForKey === 'undefined') { var errorMessage = getUndefinedStateErrorMessage(_key, action); throw new Error(errorMessage); } nextState[_key] = nextStateForKey; hasChanged = hasChanged || nextStateForKey !== previousStateForKey; } return hasChanged ? nextState : state; }; } function bindActionCreator(actionCreator, dispatch) { return function () { return dispatch(actionCreator.apply(this, arguments)); }; } /** * Turns an object whose values are action creators, into an object with the * same keys, but with every function wrapped into a `dispatch` call so they * may be invoked directly. This is just a convenience method, as you can call * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. * * For convenience, you can also pass a single function as the first argument, * and get a function in return. * * @param {Function|Object} actionCreators An object whose values are action * creator functions. One handy way to obtain it is to use ES6 `import * as` * syntax. You may also pass a single function. * * @param {Function} dispatch The `dispatch` function available on your Redux * store. * * @returns {Function|Object} The object mimicking the original object, but with * every action creator wrapped into the `dispatch` call. If you passed a * function as `actionCreators`, the return value will also be a single * function. */ function bindActionCreators(actionCreators, dispatch) { if (typeof actionCreators === 'function') { return bindActionCreator(actionCreators, dispatch); } if (typeof actionCreators !== 'object' || actionCreators === null) { throw new Error("bindActionCreators expected an object or a function, instead received " + (actionCreators === null ? 'null' : typeof actionCreators) + ". " + "Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?"); } var keys = Object.keys(actionCreators); var boundActionCreators = {}; for (var i = 0; i < keys.length; i++) { var key = keys[i]; var actionCreator = actionCreators[key]; if (typeof actionCreator === 'function') { boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); } } return boundActionCreators; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } /** * Composes single-argument functions from right to left. The rightmost * function can take multiple arguments as it provides the signature for * the resulting composite function. * * @param {...Function} funcs The functions to compose. * @returns {Function} A function obtained by composing the argument functions * from right to left. For example, compose(f, g, h) is identical to doing * (...args) => f(g(h(...args))). */ function compose() { for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { funcs[_key] = arguments[_key]; } if (funcs.length === 0) { return function (arg) { return arg; }; } if (funcs.length === 1) { return funcs[0]; } return funcs.reduce(function (a, b) { return function () { return a(b.apply(void 0, arguments)); }; }); } /** * Creates a store enhancer that applies middleware to the dispatch method * of the Redux store. This is handy for a variety of tasks, such as expressing * asynchronous actions in a concise manner, or logging every action payload. * * See `redux-thunk` package as an example of the Redux middleware. * * Because middleware is potentially asynchronous, this should be the first * store enhancer in the composition chain. * * Note that each middleware will be given the `dispatch` and `getState` functions * as named arguments. * * @param {...Function} middlewares The middleware chain to be applied. * @returns {Function} A store enhancer applying the middleware. */ function applyMiddleware() { for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) { middlewares[_key] = arguments[_key]; } return function (createStore) { return function () { var store = createStore.apply(void 0, arguments); var _dispatch = function dispatch() { throw new Error("Dispatching while constructing your middleware is not allowed. " + "Other middleware would not be applied to this dispatch."); }; var middlewareAPI = { getState: store.getState, dispatch: function dispatch() { return _dispatch.apply(void 0, arguments); } }; var chain = middlewares.map(function (middleware) { return middleware(middlewareAPI); }); _dispatch = compose.apply(void 0, chain)(store.dispatch); return _objectSpread({}, store, { dispatch: _dispatch }); }; }; } /* * This is a dummy function to check if the function name has been altered by minification. * If the function has been minified and NODE_ENV !== 'production', warn the user. */ function isCrushed() {} if (false) { warning('You are currently using minified code outside of NODE_ENV === "production". ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' + 'to ensure you have the correct code for your production build.'); } /***/ }), /* 119 */ /***/ (function(module, exports, __webpack_require__) { var _Object$getOwnPropertyDescriptor = __webpack_require__(250); var _Object$defineProperty = __webpack_require__(151); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = _Object$defineProperty && _Object$getOwnPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } module.exports = _interopRequireWildcard; /***/ }), /* 120 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css__ = __webpack_require__(28); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_modal__ = __webpack_require__(29); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_modal___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_modal__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_educoder__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_axios__ = __webpack_require__(8); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_axios__); var _createClass=function(){function defineProperties(target,props){for(var i=0;i 1 && arguments[1] !== undefined ? arguments[1] : 0; var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; false ? (0, _warning.default)(value >= min && value <= max, "Material-UI: the value provided ".concat(value, " is out of range [").concat(min, ", ").concat(max, "].")) : void 0; if (value < min) { return min; } if (value > max) { return max; } return value; } /** * Converts a color from CSS hex format to CSS rgb format. * * @param {string} color - Hex color, i.e. #nnn or #nnnnnn * @returns {string} A CSS rgb color string */ function convertHexToRGB(color) { color = color.substr(1); var re = new RegExp(".{1,".concat(color.length / 3, "}"), 'g'); var colors = color.match(re); if (colors && colors[0].length === 1) { colors = colors.map(function (n) { return n + n; }); } return colors ? "rgb(".concat(colors.map(function (n) { return parseInt(n, 16); }).join(', '), ")") : ''; } /** * Returns an object with the type and values of a color. * * Note: Does not support rgb % values. * * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() * @returns {object} - A MUI color object: {type: string, values: number[]} */ function decomposeColor(color) { if (color.charAt(0) === '#') { return decomposeColor(convertHexToRGB(color)); } var marker = color.indexOf('('); var type = color.substring(0, marker); var values = color.substring(marker + 1, color.length - 1).split(','); values = values.map(function (value) { return parseFloat(value); }); if (false) { if (['rgb', 'rgba', 'hsl', 'hsla'].indexOf(type) === -1) { throw new Error(["Material-UI: unsupported `".concat(color, "` color."), 'We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla().'].join('\n')); } } return { type: type, values: values }; } /** * Converts a color object with type and values to a string. * * @param {object} color - Decomposed color * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla' * @param {array} color.values - [n,n,n] or [n,n,n,n] * @returns {string} A CSS color string */ function recomposeColor(color) { var type = color.type; var values = color.values; if (type.indexOf('rgb') !== -1) { // Only convert the first 3 values to int (i.e. not alpha) values = values.map(function (n, i) { return i < 3 ? parseInt(n, 10) : n; }); } if (type.indexOf('hsl') !== -1) { values[1] = "".concat(values[1], "%"); values[2] = "".concat(values[2], "%"); } return "".concat(color.type, "(").concat(values.join(', '), ")"); } /** * Calculates the contrast ratio between two colors. * * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests * * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() * @returns {number} A contrast ratio value in the range 0 - 21. */ function getContrastRatio(foreground, background) { var lumA = getLuminance(foreground); var lumB = getLuminance(background); return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05); } /** * The relative brightness of any point in a color space, * normalized to 0 for darkest black and 1 for lightest white. * * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests * * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() * @returns {number} The relative brightness of the color in the range 0 - 1 */ function getLuminance(color) { var decomposedColor = decomposeColor(color); if (decomposedColor.type.indexOf('rgb') !== -1) { var rgb = decomposedColor.values.map(function (val) { val /= 255; // normalized return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4); }); // Truncate at 3 digits return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3)); } // else if (decomposedColor.type.indexOf('hsl') !== -1) return decomposedColor.values[2] / 100; } /** * Darken or lighten a colour, depending on its luminance. * Light colors are darkened, dark colors are lightened. * * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() * @param {number} coefficient=0.15 - multiplier in the range 0 - 1 * @returns {string} A CSS color string. Hex input values are returned as rgb */ function emphasize(color) { var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15; return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient); } /** * Set the absolute transparency of a color. * Any existing alpha values are overwritten. * * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() * @param {number} value - value to set the alpha channel to in the range 0 -1 * @returns {string} A CSS color string. Hex input values are returned as rgb */ function fade(color, value) { false ? (0, _warning.default)(color, "Material-UI: missing color argument in fade(".concat(color, ", ").concat(value, ").")) : void 0; if (!color) return color; color = decomposeColor(color); value = clamp(value); if (color.type === 'rgb' || color.type === 'hsl') { color.type += 'a'; } color.values[3] = value; return recomposeColor(color); } /** * Darkens a color. * * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() * @param {number} coefficient - multiplier in the range 0 - 1 * @returns {string} A CSS color string. Hex input values are returned as rgb */ function darken(color, coefficient) { false ? (0, _warning.default)(color, "Material-UI: missing color argument in darken(".concat(color, ", ").concat(coefficient, ").")) : void 0; if (!color) return color; color = decomposeColor(color); coefficient = clamp(coefficient); if (color.type.indexOf('hsl') !== -1) { color.values[2] *= 1 - coefficient; } else if (color.type.indexOf('rgb') !== -1) { for (var i = 0; i < 3; i += 1) { color.values[i] *= 1 - coefficient; } } return recomposeColor(color); } /** * Lightens a color. * * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla() * @param {number} coefficient - multiplier in the range 0 - 1 * @returns {string} A CSS color string. Hex input values are returned as rgb */ function lighten(color, coefficient) { false ? (0, _warning.default)(color, "Material-UI: missing color argument in lighten(".concat(color, ", ").concat(coefficient, ").")) : void 0; if (!color) return color; color = decomposeColor(color); coefficient = clamp(coefficient); if (color.type.indexOf('hsl') !== -1) { color.values[2] += (100 - color.values[2]) * coefficient; } else if (color.type.indexOf('rgb') !== -1) { for (var i = 0; i < 3; i += 1) { color.values[i] += (255 - color.values[i]) * coefficient; } } return recomposeColor(color); } /***/ }), /* 122 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _iterator = __webpack_require__(480); var _iterator2 = _interopRequireDefault(_iterator); var _symbol = __webpack_require__(487); var _symbol2 = _interopRequireDefault(_symbol); var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { return typeof obj === "undefined" ? "undefined" : _typeof(obj); } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); }; /***/ }), /* 123 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(485); var global = __webpack_require__(40); var hide = __webpack_require__(48); var Iterators = __webpack_require__(66); var TO_STRING_TAG = __webpack_require__(32)('toStringTag'); var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + 'TextTrackList,TouchList').split(','); for (var i = 0; i < DOMIterables.length; i++) { var NAME = DOMIterables[i]; var Collection = global[NAME]; var proto = Collection && Collection.prototype; if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); Iterators[NAME] = Iterators.Array; } /***/ }), /* 124 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _getDisplayName = __webpack_require__(258); var _getDisplayName2 = _interopRequireDefault(_getDisplayName); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var wrapDisplayName = function wrapDisplayName(BaseComponent, hocName) { return hocName + '(' + (0, _getDisplayName2.default)(BaseComponent) + ')'; }; exports.default = wrapDisplayName; /***/ }), /* 125 */ /***/ (function(module, exports) { // Source: http://jsfiddle.net/vWx8V/ // http://stackoverflow.com/questions/5603195/full-list-of-javascript-keycodes /** * Conenience method returns corresponding value for given keyName or keyCode. * * @param {Mixed} keyCode {Number} or keyName {String} * @return {Mixed} * @api public */ function keyCode(searchInput) { // Keyboard Events if (searchInput && 'object' === typeof searchInput) { var hasKeyCode = searchInput.which || searchInput.keyCode || searchInput.charCode if (hasKeyCode) searchInput = hasKeyCode } // Numbers if ('number' === typeof searchInput) return names[searchInput] // Everything else (cast to string) var search = String(searchInput) // check codes var foundNamedKey = codes[search.toLowerCase()] if (foundNamedKey) return foundNamedKey // check aliases var foundNamedKey = aliases[search.toLowerCase()] if (foundNamedKey) return foundNamedKey // weird character? if (search.length === 1) return search.charCodeAt(0) return undefined } /** * Compares a keyboard event with a given keyCode or keyName. * * @param {Event} event Keyboard event that should be tested * @param {Mixed} keyCode {Number} or keyName {String} * @return {Boolean} * @api public */ keyCode.isEventKey = function isEventKey(event, nameOrCode) { if (event && 'object' === typeof event) { var keyCode = event.which || event.keyCode || event.charCode if (keyCode === null || keyCode === undefined) { return false; } if (typeof nameOrCode === 'string') { // check codes var foundNamedKey = codes[nameOrCode.toLowerCase()] if (foundNamedKey) { return foundNamedKey === keyCode; } // check aliases var foundNamedKey = aliases[nameOrCode.toLowerCase()] if (foundNamedKey) { return foundNamedKey === keyCode; } } else if (typeof nameOrCode === 'number') { return nameOrCode === keyCode; } return false; } } exports = module.exports = keyCode; /** * Get by name * * exports.code['enter'] // => 13 */ var codes = exports.code = exports.codes = { 'backspace': 8, 'tab': 9, 'enter': 13, 'shift': 16, 'ctrl': 17, 'alt': 18, 'pause/break': 19, 'caps lock': 20, 'esc': 27, 'space': 32, 'page up': 33, 'page down': 34, 'end': 35, 'home': 36, 'left': 37, 'up': 38, 'right': 39, 'down': 40, 'insert': 45, 'delete': 46, 'command': 91, 'left command': 91, 'right command': 93, 'numpad *': 106, 'numpad +': 107, 'numpad -': 109, 'numpad .': 110, 'numpad /': 111, 'num lock': 144, 'scroll lock': 145, 'my computer': 182, 'my calculator': 183, ';': 186, '=': 187, ',': 188, '-': 189, '.': 190, '/': 191, '`': 192, '[': 219, '\\': 220, ']': 221, "'": 222 } // Helper aliases var aliases = exports.aliases = { 'windows': 91, '⇧': 16, '⌥': 18, '⌃': 17, '⌘': 91, 'ctl': 17, 'control': 17, 'option': 18, 'pause': 19, 'break': 19, 'caps': 20, 'return': 13, 'escape': 27, 'spc': 32, 'spacebar': 32, 'pgup': 33, 'pgdn': 34, 'ins': 45, 'del': 46, 'cmd': 91 } /*! * Programatically add the following */ // lower case chars for (i = 97; i < 123; i++) codes[String.fromCharCode(i)] = i - 32 // numbers for (var i = 48; i < 58; i++) codes[i - 48] = i // function keys for (i = 1; i < 13; i++) codes['f'+i] = i + 111 // numpad keys for (i = 0; i < 10; i++) codes['numpad '+i] = i + 96 /** * Get by code * * exports.name[13] // => 'Enter' */ var names = exports.names = exports.title = {} // title for backward compat // Create reverse mapping for (i in codes) names[codes[i]] = i // Add aliases for (var alias in aliases) { codes[alias] = aliases[alias] } /***/ }), /* 126 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_notification_style_css__ = __webpack_require__(38); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_notification_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_notification_style_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_notification__ = __webpack_require__(39); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_notification___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_notification__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_react_router__ = __webpack_require__(77); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_material_ui_Dialog__ = __webpack_require__(117); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_material_ui_Dialog___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_material_ui_Dialog__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_axios__ = __webpack_require__(8); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_axios__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__LoginDialog_css__ = __webpack_require__(273); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__LoginDialog_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__LoginDialog_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_educoder__ = __webpack_require__(5); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__user_Notcompletedysl__ = __webpack_require__(207); var _createClass=function(){function defineProperties(target,props){for(var i=0;i去注册").show();}else{$("#pass_name_input").next().find("p").html("该邮箱尚未绑定,你可以登录后去绑定").show();}}else{$("#pass_name_input").next().find("p").hide();if(type==6){$("#send_code_notice").html(data.msg).show();}else{var uurl=window.gotoEmail(data.link);$("#send_code_notice").html("验证码已经发送到您的邮箱,去查收").show();}time(btn);}});}else{$("#passlogin_error_notice").show();}}}}var LoginDialog=function(_Component){_inherits(LoginDialog,_Component);function LoginDialog(props){_classCallCheck(this,LoginDialog);var _this=_possibleConstructorReturn(this,(LoginDialog.__proto__||Object.getPrototypeOf(LoginDialog)).call(this,props));_this.enter=function(num){_this.setState({login:num,speedy:1,dialogBox:'dialogBox'});};_this.register=function(num){_this.setState({login:1,speedy:num,dialogBox:'dialogBox2'});};_this.inputOnBlur=function(e,id){_this.Emailphonenumberverification(e.target.value,1);};_this.loginChange=function(e){var stirngt="";if(e.target.value.length>0){var str=e.target.value.replace(/\s*/g,"");stirngt=str;}else{stirngt=e.target.value;}if(e.target.value.length===0){_this.setState({loginValue:stirngt,Phonenumberisnotco:undefined});}else{_this.setState({loginValue:stirngt,Phonenumberisnotco:undefined});}// let reg = /^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/; // let reg1 = /^1\d{10}$/; // let reg2=/^[a-zA-z]\w{3,14}$/; // // let reg3=/^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/; // let value=this.refs.loginPassText.value; // let valuenum= value.length; // if(valuenum>0){ // if(!reg.test(value)&&!reg1.test(value)&&!reg2.test(value)){ // this.setState({regular:1}) // return // }else{ // // this.setState({loginValue:value}); // this.setState({regular:0}); // var stirngt; // if(value.length>0){ // var str= value.replace(/\s*/g,"") // stirngt=str; // }else{ // stirngt= value; // } // this.setState({ // loginValue:stirngt, // }); // } // }else{ // this.setState({loginValue:value}); // var stirngt; // if(value.length>0){ // var str= value.replace(/\s*/g,"") // stirngt=str; // }else{ // stirngt= value; // } // this.setState({ // loginValue:stirngt, // }); // } };_this.Emailphonenumberverification=function(value,id){var url='/accounts/valid_email_and_phone.json';__WEBPACK_IMPORTED_MODULE_5_axios___default.a.get(url,{params:{login:value,type:1}}).then(function(result){if(result){if(result.data.status===-2){if(result.data.message==="该手机号码或邮箱已被注册"){_this.setState({Phonenumberisnotco:undefined,Phonenumberisnotcobool:false});}else{_this.setState({Phonenumberisnotco:result.data.message,Phonenumberisnotcobool:true});}return;}else{_this.setState({Phonenumberisnotco:undefined,Phonenumberisnotcobool:false});return;}}}).catch(function(error){});};_this.passwordChange=function(){var value=_this.refs.passwordText.value;var valuenum=value.length;_this.setState({disabled:false});_this.setState({bottonclass:'log-botton mt5 edu-back-blue'});if(valuenum==0){_this.setState({bottonclass:'log-botton mt5'});_this.setState({disabled:true});}_this.setState({passValue:value});};_this.handleInputChange=function(event){var target=event.target;var value=target.type==='checkbox'?target.checked:target.value;var name=target.name;_this.setState(_defineProperty({},name,value));if(value===true){_this.setState({isGoingValue:1});}else{_this.setState({isGoingValue:0});}};_this.shortcutIdChange=function(){var reg=/^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/;var reg1=/^1\d{10}$/;var reg2=/^[a-zA-z]\w{3,14}$/;var value=_this.refs.shortcutText.value;var valuenum=value.length;if(valuenum>0){if(!reg.test(value)&&!reg1.test(value)&&!reg2.test(value)){_this.setState({shortcutnum:0});_this.setState({disabledType:true});_this.setState({gaincode:'gain-code'});return;}else{_this.setState({gaincode:'gain-code edu-back-blue'});_this.setState({shortcutValue:value});_this.setState({shortcutnum:1});_this.setState({disabledType:false});}}else{_this.setState({shortcutValue:value});}};_this.authCodeChange=function(){var value=_this.refs.authCodeText.value;var valuenum=value.length;if(valuenum>3){_this.setState({authCodeType:false});_this.setState({authCodeclass:'log-botton mt5 edu-back-blue'});}else if(valuenum==0){_this.setState({authCodeType:true});_this.setState({authCodeclass:'log-botton mt5'});}};_this.get_login_verification_code=function(){get_login_verification_code($('#get_verification_code')[0]);};_this.dragWrapper=function(){var $=window.$;$.fn.drag=function(options){var x,drag=this,isMove=false,defaults={};var options=$.extend(defaults,options);var handler=drag.find('.handler');var drag_bg=drag.find('.drag_bg');var text=drag.find('.drag_text');var maxWidth=100;//鼠标按下时候的x轴的位置 handler.mousedown(function(e){isMove=true;x=e.pageX-parseInt(handler.css('left'),10);maxWidth=drag.width()-handler.width()-2;//能滑动的最大间距 });$(document).mousemove(function(e){var _x=e.pageX-x;// _x = e.pageX - (e.pageX - parseInt(handler.css('left'), 10)) = x if(isMove){if(_x>0&&_x<=maxWidth){handler.css({'left':_x});drag_bg.css({'width':_x});}else if(_x>maxWidth){//鼠标指针移动距离达到最大时清空事件 dragOk();}}}).mouseup(function(e){isMove=false;var _x=e.pageX-x;if(_x0){flag=false;break;}}return flag;};_this.handleDialogClose=function(){// if(this.props.match.path==='/'){ // this.setState({ // isRender: false // }) // this.props.Modifyloginvalue(); // }else{ // if(this.props.isloginCancel===undefined){ // window.location.href="/"; // this.props.Modifyloginvalue(); // // this.setState({ // // isRender: false // // }) // // this.props.Modifyloginvalue(); // }else{ // this.setState({ // isRender: false // }) // this.props.Modifyloginvalue(); // } _this.setState({isRender:false});_this.props.Modifyloginvalue();_this.props.history.push("/login");// this.setState({ // isRender: false // }) // try { // this.props.Modifyloginvalue(); // }catch (e) { // // } };_this.loginEDU=function(){var _this$state=_this.state,loginValue=_this$state.loginValue,passValue=_this$state.passValue,regular=_this$state.regular,isGoingValue=_this$state.isGoingValue;if(regular===1){return;}var newloginValue=loginValue.replace(/(^\s*)|(\s*$)/g,"");var newpassValue=passValue.replace(/(^\s*)|(\s*$)/g,"");var url='/accounts/login.json';__WEBPACK_IMPORTED_MODULE_5_axios___default.a.post(url,{login:newloginValue,password:newpassValue,autologin:isGoingValue}).then(function(response){// debugger; if(response===undefined){return;}if(response.status===200){if(response.data.status===402){// window.location.href = response.data.url; }else if(response.data.status===-2){if(response.data.message==="登录密码出错已达上限,账号已被锁定, 请10分钟后重新登录或找回密码"){var messge=__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('p',null,'\u767B\u5F55\u5BC6\u7801\u51FA\u9519\u5DF2\u8FBE\u4E0A\u9650\uFF0C\u8D26\u53F7\u5DF2\u88AB\u9501\u5B9A\uFF1B'),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('p',{className:'mt10'},'\u8BF710\u5206\u949F\u540E\u91CD\u65B0\u767B\u5F55\u6216',__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('a',{href:'/changepassword',style:{textDecoration:"underline",color:"#4CACFF"}},'\u627E\u56DE\u5BC6\u7801')));_this.openNotifications(messge);}else{__WEBPACK_IMPORTED_MODULE_1_antd_lib_notification___default.a.open({message:'提示',description:response.data.message,duration:5});}}else{Object(__WEBPACK_IMPORTED_MODULE_7_educoder__["E" /* broadcastChannelPostMessage */])('refreshPage');_this.setState({isRender:false});_this.props.Modifyloginvalue();window.location.reload();}}// try { // this.props.Modifyloginvalue(); // }catch (e) { // // } }).catch(function(error){console.log("356");console.log(error);});};_this.setNotcompleteds=function(){_this.setState({Notcompleteds:true,MyEduCoderModals:false});};_this.setMyEduCoderModals=function(){_this.setState({MyEduCoderModals:true});};_this.onKeydowns=function(e){var disabled=_this.state.disabled;if(disabled===false&&e.keyCode===13){_this.loginEDU();console.log(1);}};_this.getloginurl=function(url){window.location.href=url;};_this.openweixinlogin=function(){_this.setState({weixinlogin:true});};_this.openNotifications=function(btn){// type 1 成功提示绿色 2提醒颜色黄色 3错误提示红色 __WEBPACK_IMPORTED_MODULE_1_antd_lib_notification___default.a.open({message:"提示",description:btn,duration:5,onClick:function onClick(){}});};_this.openqqlogin=function(){_this.setState({qqlogin:true});//window.location.href=`https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2f${window.location.host}%2otherloginqq&response_type=code` window.location.href='https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginqq&state=null,'+window.location.host+'&response_type=code';// window.location.href=`https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginstart&tp=qq&response_type=code` };_this.openphoneqqlogin=function(){window.open('https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginqq&state=null,'+window.location.host+'&response_type=code');};_this.getTContainer=function(){return document.body;};_this.hideweixinlogin=function(){_this.setState({weixinlogin:false,qqlogin:false});};_this.state={open:true,login:0,speedy:1,regular:0,loginValue:'',passValue:'',isGoing:true,isGoingValue:1,disabled:true,bottonclass:'log-botton mt5',dialogBox:'dialogBox',shortcutValue:'',shortcutnum:1,disabledType:true,gaincode:'gain-code',authCodeType:true,authCodeclass:'log-botton mt5',isRender:false,MyEduCoderModals:false,Phonenumberisnotco:undefined,Phonenumberisnotcobool:false,weixinlogin:false,qqlogin:false};return _this;}// 输入页面 //邮箱手机号验证 // 快捷注册 _createClass(LoginDialog,[{key:'componentWillReceiveProps',value:function componentWillReceiveProps(nextProps){this.setState({isRender:nextProps.isRender});// console.log(nextProps.isRender); }},{key:'componentDidMount',value:function componentDidMount(){var _this2=this;var flag=this.IsPC();//true为PC端,false为手机端 this.setState({isphone:flag});if(this.props.isRender!=undefined){this.setState({isRender:this.props.isRender});}// $(document).on("showLoginDialog", (e, args)=>{ // this.setState({ // isRender: true // }) // }) this.dragWrapper();__WEBPACK_IMPORTED_MODULE_5_axios___default.a.interceptors.response.use(function(response){if(response!=undefined)if(response&&response.data.status===401){document.title="提示";_this2.setState({isRender:true});}return response;},function(error){// // if (error.response && error.response.data.error === '401 Unauthorized') { // // this.back_url = window.location.href; // // this.setState({ // // isRender: true // // }) // // // TODO 这里如果样式变了会出现css不加载的情况 // // const $ = window.$; // // const isCssLoaded = window.getComputedStyle($('.log_nav li.active')[0], null) // // .getPropertyValue('border-bottom') // // == "2px solid rgb(69, 155, 229)" // // if (!isCssLoaded) { // // const isPort3007 = window.location.port == 3007; // // let _url_origin = isPort3007 ? 'http://localhost:3000' : '' // // // // $('head').append( $('') // // .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css`) ); // // $('head').append( $('') // // .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css`) ); // // } // // } // // return Promise.reject(error); });}},{key:'render',value:function render(){var _this3=this;var _state=this.state,qqlogin=_state.qqlogin,login=_state.login,isGoing=_state.isGoing,isGoingValue=_state.isGoingValue,disabled=_state.disabled,bottonclass=_state.bottonclass,Phonenumberisnotco=_state.Phonenumberisnotco,dialogBox=_state.dialogBox,isRender=_state.isRender,weixinlogin=_state.weixinlogin;if(isRender===undefined){isRender=false;}return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_4_material_ui_Dialog___default.a,{open:true,id:'DialogID',className:'zindextest',style:{display:isRender==false?'none':''},disableEscapeKeyDown:true,disableBackdropClick:true,onClose:function onClose(){return _this3.handleDialogClose();}},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_8__user_Notcompletedysl__["a" /* default */],{modalsType:this.state.MyEduCoderModals,setNotcompleteds:function setNotcompleteds(){_this3.setNotcompleteds();}}),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('style',null,'\n\t\t\t\t\t\t #DialogID .dialogBox {\n\t\t\t\t\t\t\t\t\twidth: 405px !important;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.dialogBox {\n\t\t\t\t\t\t\t\t\theight: 290px !important;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t'),isRender===true?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('div',{className:dialogBox},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('div',{id:'closeIcon',className:"logincloseIcon",onClick:function onClick(){_this3.handleDialogClose();}},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('i',{className:'iconfont icon-shanchudiao'})),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('div',{id:'log_reg_content'},weixinlogin===true?"":__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('ul',{className:'log_nav clearfix'},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('li',{className:login==0?'active':'',onClick:function onClick(){_this3.enter(0);}},'\u767B\u5F55')),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('div',{className:'login-panel',id:'login-panel-1',style:{display:login==0?'block':'none'}},weixinlogin===true?"":__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('form',{acceptCharset:'UTF-8',action:'/login',id:'main_login_form',method:'post'},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('div',{style:{"display":"inline","padding":"0","margin":"0"}},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('input',{name:'utf8',type:'hidden',value:'\u2713'}),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('input',{name:'authenticity_token',type:'hidden',value:'NVLiIlHZfhVBQtO9djnWncJqqdikNQIIxEmOvzK9vNM='})),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('input',{name:'back_url',type:'hidden',value:this.back_url}),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('input',{type:'text',className:'input-100-45 mt20',id:'name_loggin_input',ref:'loginPassText',onInput:this.loginChange,onBlur:function onBlur(e){return _this3.inputOnBlur(e,1);},onPressEnter:disabled===false?this.loginEDU:function(){}// console.log(1) ,value:this.state.loginValue,name:'username',placeholder:'\u8BF7\u8F93\u5165\u6709\u6548\u7684\u624B\u673A\u53F7/\u90AE\u7BB1\u53F7'}),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('div',{style:{height:'25px'}},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('p',{className:'color-orange edu-txt-left none',id:'username_error_notice',style:{display:Phonenumberisnotco===undefined?'none':'block'}},Phonenumberisnotco)),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('input',{type:'password',id:'password_loggin_input',name:'password',ref:'passwordText',onInput:this.passwordChange,onKeyDown:this.onKeydowns,className:'input-100-45 mt5',onPressEnter:disabled===false?this.loginEDU:function(){}// console.log(1) ,placeholder:'\u5BC6\u7801'}),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('div',{style:{height:'25px'}},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('p',{className:'color-orange edu-txt-left none',id:'password_error_notice'},'\u8BF7\u8F93\u5165\u5BC6\u7801'))),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('div',{className:disabled===false?"bluebutton edu-back-blue":"bluebutton",onClick:disabled===false?this.loginEDU:function(){}// console.log(1) },'\u767B\u5F55'),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('p',{className:'clearfix mt20'},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:'fl'},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('input',{type:'checkbox',className:'mr5 magic-checkbox',checked:isGoing,onChange:this.handleInputChange,value:isGoingValue,name:'isGoing',id:'p_autolog'}),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('label',{htmlFor:'p_autolog',style:{top:'0px'}},'\u4E0B\u6B21\u81EA\u52A8\u767B\u5F55')),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:'fr'},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('a',{onClick:function onClick(url){return _this3.getloginurl("/changepassword");},className:'mr3 color-grey-9'},'\u627E\u56DE\u5BC6\u7801'),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('em',{className:'vertical-line'}),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('a',{onClick:function onClick(url){return _this3.getloginurl("/register");},className:'color-grey-9'},'\u6CE8\u518C'))),this.props.user&&this.props.user.main_site===true?this.state.isphone===true?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('p',{className:'clearfix mt20'},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:"startlogin"},'\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014 \u5FEB\u901F\u767B\u5F55 \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014'),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('div',{className:"mt10"},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('a',{onClick:function onClick(){return _this3.openweixinlogin();}},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('img',{src:__webpack_require__(788),alt:'\u5FAE\u4FE1\u767B\u5F55'})),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('a',{onClick:function onClick(){return _this3.openqqlogin();},className:"ml10"},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('img',{src:__webpack_require__(302),alt:'qq\u767B\u5F55'})))):__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('p',{className:'clearfix mt20'},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:"startlogin"},'\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014 \u5FEB\u901F\u767B\u5F55 \u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014'),__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('div',{className:"mt10"},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('a',{onClick:function onClick(){return _this3.openphoneqqlogin();},className:"ml10"},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('img',{src:__webpack_require__(302),alt:'qq\u767B\u5F55'})))):""),weixinlogin===true?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('iframe',{className:"weixinheight390",frameBorder:'0',sandbox:'allow-scripts allow-same-origin allow-top-navigation',scrolling:'no',src:'https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginstart&response_type=code&scope=snsapi_login&state=null,'+window.location.host+'#wechat_redirect'}):"",weixinlogin===true?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('p',{className:'clearfix '},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('a',{className:"startlogin color-blue",onClick:function onClick(){return _this3.hideweixinlogin();}},'\u8FD4\u56DE\u8D26\u53F7\u767B\u5F55')):""))):"");}}]);return LoginDialog;}(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]);/* harmony default export */ __webpack_exports__["a"] = (LoginDialog); /***/ }), /* 127 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(19); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(59); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(11); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__ = __webpack_require__(34); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(12); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(13); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__ = __webpack_require__(497); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__AnimateChild__ = __webpack_require__(498); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__util_animate__ = __webpack_require__(248); var defaultKey = 'rc_animate_' + Date.now(); function getChildrenFromProps(props) { var children = props.children; if (__WEBPACK_IMPORTED_MODULE_6_react___default.a.isValidElement(children)) { if (!children.key) { return __WEBPACK_IMPORTED_MODULE_6_react___default.a.cloneElement(children, { key: defaultKey }); } } return children; } function noop() {} var Animate = function (_React$Component) { __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(Animate, _React$Component); // eslint-disable-line function Animate(props) { __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Animate); var _this = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, (Animate.__proto__ || Object.getPrototypeOf(Animate)).call(this, props)); _initialiseProps.call(_this); _this.currentlyAnimatingKeys = {}; _this.keysToEnter = []; _this.keysToLeave = []; _this.state = { children: Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["e" /* toArrayChildren */])(getChildrenFromProps(props)) }; _this.childrenRefs = {}; return _this; } __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default()(Animate, [{ key: 'componentDidMount', value: function componentDidMount() { var _this2 = this; var showProp = this.props.showProp; var children = this.state.children; if (showProp) { children = children.filter(function (child) { return !!child.props[showProp]; }); } children.forEach(function (child) { if (child) { _this2.performAppear(child.key); } }); } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { var _this3 = this; this.nextProps = nextProps; var nextChildren = Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["e" /* toArrayChildren */])(getChildrenFromProps(nextProps)); var props = this.props; // exclusive needs immediate response if (props.exclusive) { Object.keys(this.currentlyAnimatingKeys).forEach(function (key) { _this3.stop(key); }); } var showProp = props.showProp; var currentlyAnimatingKeys = this.currentlyAnimatingKeys; // last props children if exclusive var currentChildren = props.exclusive ? Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["e" /* toArrayChildren */])(getChildrenFromProps(props)) : this.state.children; // in case destroy in showProp mode var newChildren = []; if (showProp) { currentChildren.forEach(function (currentChild) { var nextChild = currentChild && Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["a" /* findChildInChildrenByKey */])(nextChildren, currentChild.key); var newChild = void 0; if ((!nextChild || !nextChild.props[showProp]) && currentChild.props[showProp]) { newChild = __WEBPACK_IMPORTED_MODULE_6_react___default.a.cloneElement(nextChild || currentChild, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()({}, showProp, true)); } else { newChild = nextChild; } if (newChild) { newChildren.push(newChild); } }); nextChildren.forEach(function (nextChild) { if (!nextChild || !Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["a" /* findChildInChildrenByKey */])(currentChildren, nextChild.key)) { newChildren.push(nextChild); } }); } else { newChildren = Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["d" /* mergeChildren */])(currentChildren, nextChildren); } // need render to avoid update this.setState({ children: newChildren }); nextChildren.forEach(function (child) { var key = child && child.key; if (child && currentlyAnimatingKeys[key]) { return; } var hasPrev = child && Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["a" /* findChildInChildrenByKey */])(currentChildren, key); if (showProp) { var showInNext = child.props[showProp]; if (hasPrev) { var showInNow = Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["b" /* findShownChildInChildrenByKey */])(currentChildren, key, showProp); if (!showInNow && showInNext) { _this3.keysToEnter.push(key); } } else if (showInNext) { _this3.keysToEnter.push(key); } } else if (!hasPrev) { _this3.keysToEnter.push(key); } }); currentChildren.forEach(function (child) { var key = child && child.key; if (child && currentlyAnimatingKeys[key]) { return; } var hasNext = child && Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["a" /* findChildInChildrenByKey */])(nextChildren, key); if (showProp) { var showInNow = child.props[showProp]; if (hasNext) { var showInNext = Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["b" /* findShownChildInChildrenByKey */])(nextChildren, key, showProp); if (!showInNext && showInNow) { _this3.keysToLeave.push(key); } } else if (showInNow) { _this3.keysToLeave.push(key); } } else if (!hasNext) { _this3.keysToLeave.push(key); } }); } }, { key: 'componentDidUpdate', value: function componentDidUpdate() { var keysToEnter = this.keysToEnter; this.keysToEnter = []; keysToEnter.forEach(this.performEnter); var keysToLeave = this.keysToLeave; this.keysToLeave = []; keysToLeave.forEach(this.performLeave); } }, { key: 'isValidChildByKey', value: function isValidChildByKey(currentChildren, key) { var showProp = this.props.showProp; if (showProp) { return Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["b" /* findShownChildInChildrenByKey */])(currentChildren, key, showProp); } return Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["a" /* findChildInChildrenByKey */])(currentChildren, key); } }, { key: 'stop', value: function stop(key) { delete this.currentlyAnimatingKeys[key]; var component = this.childrenRefs[key]; if (component) { component.stop(); } } }, { key: 'render', value: function render() { var _this4 = this; var props = this.props; this.nextProps = props; var stateChildren = this.state.children; var children = null; if (stateChildren) { children = stateChildren.map(function (child) { if (child === null || child === undefined) { return child; } if (!child.key) { throw new Error('must set key for children'); } return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement( __WEBPACK_IMPORTED_MODULE_9__AnimateChild__["a" /* default */], { key: child.key, ref: function ref(node) { _this4.childrenRefs[child.key] = node; }, animation: props.animation, transitionName: props.transitionName, transitionEnter: props.transitionEnter, transitionAppear: props.transitionAppear, transitionLeave: props.transitionLeave }, child ); }); } var Component = props.component; if (Component) { var passedProps = props; if (typeof Component === 'string') { passedProps = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({ className: props.className, style: props.style }, props.componentProps); } return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement( Component, passedProps, children ); } return children[0] || null; } }]); return Animate; }(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component); Animate.isAnimate = true; Animate.propTypes = { component: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.any, componentProps: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object, animation: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object, transitionName: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object]), transitionEnter: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, transitionAppear: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, exclusive: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, transitionLeave: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool, onEnd: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, onEnter: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, onLeave: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, onAppear: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func, showProp: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string, children: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.node }; Animate.defaultProps = { animation: {}, component: 'span', componentProps: {}, transitionEnter: true, transitionLeave: true, transitionAppear: false, onEnd: noop, onEnter: noop, onLeave: noop, onAppear: noop }; var _initialiseProps = function _initialiseProps() { var _this5 = this; this.performEnter = function (key) { // may already remove by exclusive if (_this5.childrenRefs[key]) { _this5.currentlyAnimatingKeys[key] = true; _this5.childrenRefs[key].componentWillEnter(_this5.handleDoneAdding.bind(_this5, key, 'enter')); } }; this.performAppear = function (key) { if (_this5.childrenRefs[key]) { _this5.currentlyAnimatingKeys[key] = true; _this5.childrenRefs[key].componentWillAppear(_this5.handleDoneAdding.bind(_this5, key, 'appear')); } }; this.handleDoneAdding = function (key, type) { var props = _this5.props; delete _this5.currentlyAnimatingKeys[key]; // if update on exclusive mode, skip check if (props.exclusive && props !== _this5.nextProps) { return; } var currentChildren = Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["e" /* toArrayChildren */])(getChildrenFromProps(props)); if (!_this5.isValidChildByKey(currentChildren, key)) { // exclusive will not need this _this5.performLeave(key); } else if (type === 'appear') { if (__WEBPACK_IMPORTED_MODULE_10__util_animate__["a" /* default */].allowAppearCallback(props)) { props.onAppear(key); props.onEnd(key, true); } } else if (__WEBPACK_IMPORTED_MODULE_10__util_animate__["a" /* default */].allowEnterCallback(props)) { props.onEnter(key); props.onEnd(key, true); } }; this.performLeave = function (key) { // may already remove by exclusive if (_this5.childrenRefs[key]) { _this5.currentlyAnimatingKeys[key] = true; _this5.childrenRefs[key].componentWillLeave(_this5.handleDoneLeaving.bind(_this5, key)); } }; this.handleDoneLeaving = function (key) { var props = _this5.props; delete _this5.currentlyAnimatingKeys[key]; // if update on exclusive mode, skip check if (props.exclusive && props !== _this5.nextProps) { return; } var currentChildren = Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["e" /* toArrayChildren */])(getChildrenFromProps(props)); // in case state change is too fast if (_this5.isValidChildByKey(currentChildren, key)) { _this5.performEnter(key); } else { var end = function end() { if (__WEBPACK_IMPORTED_MODULE_10__util_animate__["a" /* default */].allowLeaveCallback(props)) { props.onLeave(key); props.onEnd(key, false); } }; if (!Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["c" /* isSameChildren */])(_this5.state.children, currentChildren, props.showProp)) { _this5.setState({ children: currentChildren }, end); } else { end(); } } }; }; /* harmony default export */ __webpack_exports__["a"] = (Animate); /***/ }), /* 128 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(2); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _ownerDocument = _interopRequireDefault(__webpack_require__(45)); var ownerWindow = function ownerWindow(node) { var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window; var doc = (0, _ownerDocument.default)(node); return doc.defaultView || doc.parentView || fallback; }; var _default = ownerWindow; exports.default = _default; /***/ }), /* 129 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(2); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(9)); var _objectSpread2 = _interopRequireDefault(__webpack_require__(26)); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(6)); var _getPrototypeOf = _interopRequireDefault(__webpack_require__(22)); var _classCallCheck2 = _interopRequireDefault(__webpack_require__(17)); var _createClass2 = _interopRequireDefault(__webpack_require__(18)); var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(23)); var _inherits2 = _interopRequireDefault(__webpack_require__(24)); var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(25)); var _react = _interopRequireDefault(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(1)); var _Transition = _interopRequireDefault(__webpack_require__(130)); var _transitions = __webpack_require__(81); var _withTheme = _interopRequireDefault(__webpack_require__(97)); var _utils = __webpack_require__(211); // @inheritedComponent Transition var styles = { entering: { opacity: 1 }, entered: { opacity: 1 } }; /** * The Fade transition is used by the [Modal](/utils/modals) component. * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally. */ var Fade = /*#__PURE__*/ function (_React$Component) { (0, _inherits2.default)(Fade, _React$Component); function Fade() { var _ref; var _temp, _this; (0, _classCallCheck2.default)(this, Fade); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return (0, _possibleConstructorReturn2.default)(_this, (_temp = _this = (0, _possibleConstructorReturn2.default)(this, (_ref = Fade.__proto__ || (0, _getPrototypeOf.default)(Fade)).call.apply(_ref, [this].concat(args))), Object.defineProperty((0, _assertThisInitialized2.default)(_this), "handleEnter", { configurable: true, enumerable: true, writable: true, value: function value(node) { var theme = _this.props.theme; (0, _utils.reflow)(node); // So the animation always start from the start. var transitionProps = (0, _utils.getTransitionProps)(_this.props, { mode: 'enter' }); node.style.webkitTransition = theme.transitions.create('opacity', transitionProps); node.style.transition = theme.transitions.create('opacity', transitionProps); if (_this.props.onEnter) { _this.props.onEnter(node); } } }), Object.defineProperty((0, _assertThisInitialized2.default)(_this), "handleExit", { configurable: true, enumerable: true, writable: true, value: function value(node) { var theme = _this.props.theme; var transitionProps = (0, _utils.getTransitionProps)(_this.props, { mode: 'exit' }); node.style.webkitTransition = theme.transitions.create('opacity', transitionProps); node.style.transition = theme.transitions.create('opacity', transitionProps); if (_this.props.onExit) { _this.props.onExit(node); } } }), _temp)); } (0, _createClass2.default)(Fade, [{ key: "render", value: function render() { var _props = this.props, children = _props.children, onEnter = _props.onEnter, onExit = _props.onExit, styleProp = _props.style, theme = _props.theme, other = (0, _objectWithoutProperties2.default)(_props, ["children", "onEnter", "onExit", "style", "theme"]); var style = (0, _objectSpread2.default)({}, styleProp, _react.default.isValidElement(children) ? children.props.style : {}); return _react.default.createElement(_Transition.default, (0, _extends2.default)({ appear: true, onEnter: this.handleEnter, onExit: this.handleExit }, other), function (state, childProps) { return _react.default.cloneElement(children, (0, _objectSpread2.default)({ style: (0, _objectSpread2.default)({ opacity: 0, willChange: 'opacity' }, styles[state], style) }, childProps)); }); } }]); return Fade; }(_react.default.Component); Fade.propTypes = false ? { /** * A single child content element. */ children: _propTypes.default.oneOfType([_propTypes.default.element, _propTypes.default.func]), /** * If `true`, the component will transition in. */ in: _propTypes.default.bool, /** * @ignore */ onEnter: _propTypes.default.func, /** * @ignore */ onExit: _propTypes.default.func, /** * @ignore */ style: _propTypes.default.object, /** * @ignore */ theme: _propTypes.default.object.isRequired, /** * The duration for the transition, in milliseconds. * You may specify a single timeout for all transitions, or individually with an object. */ timeout: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({ enter: _propTypes.default.number, exit: _propTypes.default.number })]) } : {}; Fade.defaultProps = { timeout: { enter: _transitions.duration.enteringScreen, exit: _transitions.duration.leavingScreen } }; var _default = (0, _withTheme.default)()(Fade); exports.default = _default; /***/ }), /* 130 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.default = exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = void 0; var PropTypes = _interopRequireWildcard(__webpack_require__(1)); var _react = _interopRequireDefault(__webpack_require__(0)); var _reactDom = _interopRequireDefault(__webpack_require__(4)); var _reactLifecyclesCompat = __webpack_require__(7); var _PropTypes = __webpack_require__(599); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } var UNMOUNTED = 'unmounted'; exports.UNMOUNTED = UNMOUNTED; var EXITED = 'exited'; exports.EXITED = EXITED; var ENTERING = 'entering'; exports.ENTERING = ENTERING; var ENTERED = 'entered'; exports.ENTERED = ENTERED; var EXITING = 'exiting'; /** * The Transition component lets you describe a transition from one component * state to another _over time_ with a simple declarative API. Most commonly * it's used to animate the mounting and unmounting of a component, but can also * be used to describe in-place transition states as well. * * --- * * **Note**: `Transition` is a platform-agnostic base component. If you're using * transitions in CSS, you'll probably want to use * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition) * instead. It inherits all the features of `Transition`, but contains * additional features necessary to play nice with CSS transitions (hence the * name of the component). * * --- * * By default the `Transition` component does not alter the behavior of the * component it renders, it only tracks "enter" and "exit" states for the * components. It's up to you to give meaning and effect to those states. For * example we can add styles to a component when it enters or exits: * * ```jsx * import { Transition } from 'react-transition-group'; * * const duration = 300; * * const defaultStyle = { * transition: `opacity ${duration}ms ease-in-out`, * opacity: 0, * } * * const transitionStyles = { * entering: { opacity: 0 }, * entered: { opacity: 1 }, * }; * * const Fade = ({ in: inProp }) => ( * * {state => ( *
* I'm a fade Transition! *
* )} *
* ); * ``` * * There are 4 main states a Transition can be in: * - `'entering'` * - `'entered'` * - `'exiting'` * - `'exited'` * * Transition state is toggled via the `in` prop. When `true` the component * begins the "Enter" stage. During this stage, the component will shift from * its current transition state, to `'entering'` for the duration of the * transition and then to the `'entered'` stage once it's complete. Let's take * the following example (we'll use the * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook): * * ```jsx * function App() { * const [inProp, setInProp] = useState(false); * return ( *
* * {state => ( * // ... * )} * * *
* ); * } * ``` * * When the button is clicked the component will shift to the `'entering'` state * and stay there for 500ms (the value of `timeout`) before it finally switches * to `'entered'`. * * When `in` is `false` the same thing happens except the state moves from * `'exiting'` to `'exited'`. */ exports.EXITING = EXITING; var Transition = /*#__PURE__*/ function (_React$Component) { _inheritsLoose(Transition, _React$Component); function Transition(props, context) { var _this; _this = _React$Component.call(this, props, context) || this; var parentGroup = context.transitionGroup; // In the context of a TransitionGroup all enters are really appears var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear; var initialStatus; _this.appearStatus = null; if (props.in) { if (appear) { initialStatus = EXITED; _this.appearStatus = ENTERING; } else { initialStatus = ENTERED; } } else { if (props.unmountOnExit || props.mountOnEnter) { initialStatus = UNMOUNTED; } else { initialStatus = EXITED; } } _this.state = { status: initialStatus }; _this.nextCallback = null; return _this; } var _proto = Transition.prototype; _proto.getChildContext = function getChildContext() { return { transitionGroup: null // allows for nested Transitions }; }; Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) { var nextIn = _ref.in; if (nextIn && prevState.status === UNMOUNTED) { return { status: EXITED }; } return null; }; // getSnapshotBeforeUpdate(prevProps) { // let nextStatus = null // if (prevProps !== this.props) { // const { status } = this.state // if (this.props.in) { // if (status !== ENTERING && status !== ENTERED) { // nextStatus = ENTERING // } // } else { // if (status === ENTERING || status === ENTERED) { // nextStatus = EXITING // } // } // } // return { nextStatus } // } _proto.componentDidMount = function componentDidMount() { this.updateStatus(true, this.appearStatus); }; _proto.componentDidUpdate = function componentDidUpdate(prevProps) { var nextStatus = null; if (prevProps !== this.props) { var status = this.state.status; if (this.props.in) { if (status !== ENTERING && status !== ENTERED) { nextStatus = ENTERING; } } else { if (status === ENTERING || status === ENTERED) { nextStatus = EXITING; } } } this.updateStatus(false, nextStatus); }; _proto.componentWillUnmount = function componentWillUnmount() { this.cancelNextCallback(); }; _proto.getTimeouts = function getTimeouts() { var timeout = this.props.timeout; var exit, enter, appear; exit = enter = appear = timeout; if (timeout != null && typeof timeout !== 'number') { exit = timeout.exit; enter = timeout.enter; // TODO: remove fallback for next major appear = timeout.appear !== undefined ? timeout.appear : enter; } return { exit: exit, enter: enter, appear: appear }; }; _proto.updateStatus = function updateStatus(mounting, nextStatus) { if (mounting === void 0) { mounting = false; } if (nextStatus !== null) { // nextStatus will always be ENTERING or EXITING. this.cancelNextCallback(); var node = _reactDom.default.findDOMNode(this); if (nextStatus === ENTERING) { this.performEnter(node, mounting); } else { this.performExit(node); } } else if (this.props.unmountOnExit && this.state.status === EXITED) { this.setState({ status: UNMOUNTED }); } }; _proto.performEnter = function performEnter(node, mounting) { var _this2 = this; var enter = this.props.enter; var appearing = this.context.transitionGroup ? this.context.transitionGroup.isMounting : mounting; var timeouts = this.getTimeouts(); var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED // if we are mounting and running this it means appear _must_ be set if (!mounting && !enter) { this.safeSetState({ status: ENTERED }, function () { _this2.props.onEntered(node); }); return; } this.props.onEnter(node, appearing); this.safeSetState({ status: ENTERING }, function () { _this2.props.onEntering(node, appearing); _this2.onTransitionEnd(node, enterTimeout, function () { _this2.safeSetState({ status: ENTERED }, function () { _this2.props.onEntered(node, appearing); }); }); }); }; _proto.performExit = function performExit(node) { var _this3 = this; var exit = this.props.exit; var timeouts = this.getTimeouts(); // no exit animation skip right to EXITED if (!exit) { this.safeSetState({ status: EXITED }, function () { _this3.props.onExited(node); }); return; } this.props.onExit(node); this.safeSetState({ status: EXITING }, function () { _this3.props.onExiting(node); _this3.onTransitionEnd(node, timeouts.exit, function () { _this3.safeSetState({ status: EXITED }, function () { _this3.props.onExited(node); }); }); }); }; _proto.cancelNextCallback = function cancelNextCallback() { if (this.nextCallback !== null) { this.nextCallback.cancel(); this.nextCallback = null; } }; _proto.safeSetState = function safeSetState(nextState, callback) { // This shouldn't be necessary, but there are weird race conditions with // setState callbacks and unmounting in testing, so always make sure that // we can cancel any pending setState callbacks after we unmount. callback = this.setNextCallback(callback); this.setState(nextState, callback); }; _proto.setNextCallback = function setNextCallback(callback) { var _this4 = this; var active = true; this.nextCallback = function (event) { if (active) { active = false; _this4.nextCallback = null; callback(event); } }; this.nextCallback.cancel = function () { active = false; }; return this.nextCallback; }; _proto.onTransitionEnd = function onTransitionEnd(node, timeout, handler) { this.setNextCallback(handler); var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener; if (!node || doesNotHaveTimeoutOrListener) { setTimeout(this.nextCallback, 0); return; } if (this.props.addEndListener) { this.props.addEndListener(node, this.nextCallback); } if (timeout != null) { setTimeout(this.nextCallback, timeout); } }; _proto.render = function render() { var status = this.state.status; if (status === UNMOUNTED) { return null; } var _this$props = this.props, children = _this$props.children, childProps = _objectWithoutPropertiesLoose(_this$props, ["children"]); // filter props for Transtition delete childProps.in; delete childProps.mountOnEnter; delete childProps.unmountOnExit; delete childProps.appear; delete childProps.enter; delete childProps.exit; delete childProps.timeout; delete childProps.addEndListener; delete childProps.onEnter; delete childProps.onEntering; delete childProps.onEntered; delete childProps.onExit; delete childProps.onExiting; delete childProps.onExited; if (typeof children === 'function') { return children(status, childProps); } var child = _react.default.Children.only(children); return _react.default.cloneElement(child, childProps); }; return Transition; }(_react.default.Component); Transition.contextTypes = { transitionGroup: PropTypes.object }; Transition.childContextTypes = { transitionGroup: function transitionGroup() {} }; Transition.propTypes = false ? { /** * A `function` child can be used instead of a React element. This function is * called with the current transition status (`'entering'`, `'entered'`, * `'exiting'`, `'exited'`, `'unmounted'`), which can be used to apply context * specific props to a component. * * ```jsx * * {state => ( * * )} * * ``` */ children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired, /** * Show the component; triggers the enter or exit states */ in: PropTypes.bool, /** * By default the child component is mounted immediately along with * the parent `Transition` component. If you want to "lazy mount" the component on the * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay * mounted, even on "exited", unless you also specify `unmountOnExit`. */ mountOnEnter: PropTypes.bool, /** * By default the child component stays mounted after it reaches the `'exited'` state. * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting. */ unmountOnExit: PropTypes.bool, /** * Normally a component is not transitioned if it is shown when the `` component mounts. * If you want to transition on the first mount set `appear` to `true`, and the * component will transition in as soon as the `` mounts. * * > Note: there are no specific "appear" states. `appear` only adds an additional `enter` transition. */ appear: PropTypes.bool, /** * Enable or disable enter transitions. */ enter: PropTypes.bool, /** * Enable or disable exit transitions. */ exit: PropTypes.bool, /** * The duration of the transition, in milliseconds. * Required unless `addEndListener` is provided. * * You may specify a single timeout for all transitions: * * ```jsx * timeout={500} * ``` * * or individually: * * ```jsx * timeout={{ * appear: 500, * enter: 300, * exit: 500, * }} * ``` * * - `appear` defaults to the value of `enter` * - `enter` defaults to `0` * - `exit` defaults to `0` * * @type {number | { enter?: number, exit?: number, appear?: number }} */ timeout: function timeout(props) { var pt = _PropTypes.timeoutsShape; if (!props.addEndListener) pt = pt.isRequired; for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } return pt.apply(void 0, [props].concat(args)); }, /** * Add a custom transition end trigger. Called with the transitioning * DOM node and a `done` callback. Allows for more fine grained transition end * logic. **Note:** Timeouts are still used as a fallback if provided. * * ```jsx * addEndListener={(node, done) => { * // use the css transitionend event to mark the finish of a transition * node.addEventListener('transitionend', done, false); * }} * ``` */ addEndListener: PropTypes.func, /** * Callback fired before the "entering" status is applied. An extra parameter * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount * * @type Function(node: HtmlElement, isAppearing: bool) -> void */ onEnter: PropTypes.func, /** * Callback fired after the "entering" status is applied. An extra parameter * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount * * @type Function(node: HtmlElement, isAppearing: bool) */ onEntering: PropTypes.func, /** * Callback fired after the "entered" status is applied. An extra parameter * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount * * @type Function(node: HtmlElement, isAppearing: bool) -> void */ onEntered: PropTypes.func, /** * Callback fired before the "exiting" status is applied. * * @type Function(node: HtmlElement) -> void */ onExit: PropTypes.func, /** * Callback fired after the "exiting" status is applied. * * @type Function(node: HtmlElement) -> void */ onExiting: PropTypes.func, /** * Callback fired after the "exited" status is applied. * * @type Function(node: HtmlElement) -> void */ onExited: PropTypes.func // Name the function so it is clearer in the documentation } : {}; function noop() {} Transition.defaultProps = { in: false, mountOnEnter: false, unmountOnExit: false, appear: false, enter: true, exit: true, onEnter: noop, onEntering: noop, onEntered: noop, onExit: noop, onExiting: noop, onExited: noop }; Transition.UNMOUNTED = 0; Transition.EXITED = 1; Transition.ENTERING = 2; Transition.ENTERED = 3; Transition.EXITING = 4; var _default = (0, _reactLifecyclesCompat.polyfill)(Transition); exports.default = _default; /***/ }), /* 131 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /* 132 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.changeConfirmLocale = changeConfirmLocale; exports.getConfirmLocale = getConfirmLocale; var _default = _interopRequireDefault(__webpack_require__(185)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } var runtimeLocale = _extends({}, _default["default"].Modal); function changeConfirmLocale(newLocale) { if (newLocale) { runtimeLocale = _extends(_extends({}, runtimeLocale), newLocale); } else { runtimeLocale = _extends({}, _default["default"].Modal); } } function getConfirmLocale() { return runtimeLocale; } //# sourceMappingURL=locale.js.map /***/ }), /* 133 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react_router_es_Router__ = __webpack_require__(98); // Written in this round about way for babel-transform-imports /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0_react_router_es_Router__["a" /* default */]); /***/ }), /* 134 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning__ = __webpack_require__(64); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_warning__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant__ = __webpack_require__(47); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_invariant__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types__ = __webpack_require__(1); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_prop_types__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__matchPath__ = __webpack_require__(99); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var isEmptyChildren = function isEmptyChildren(children) { return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.count(children) === 0; }; /** * The public API for matching a single path and rendering. */ var Route = function (_React$Component) { _inherits(Route, _React$Component); function Route() { var _temp, _this, _ret; _classCallCheck(this, Route); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = { match: _this.computeMatch(_this.props, _this.context.router) }, _temp), _possibleConstructorReturn(_this, _ret); } Route.prototype.getChildContext = function getChildContext() { return { router: _extends({}, this.context.router, { route: { location: this.props.location || this.context.router.route.location, match: this.state.match } }) }; }; Route.prototype.computeMatch = function computeMatch(_ref, router) { var computedMatch = _ref.computedMatch, location = _ref.location, path = _ref.path, strict = _ref.strict, exact = _ref.exact, sensitive = _ref.sensitive; if (computedMatch) return computedMatch; // already computed the match for us __WEBPACK_IMPORTED_MODULE_1_invariant___default()(router, "You should not use or withRouter() outside a "); var route = router.route; var pathname = (location || route.location).pathname; return Object(__WEBPACK_IMPORTED_MODULE_4__matchPath__["a" /* default */])(pathname, { path: path, strict: strict, exact: exact, sensitive: sensitive }, route.match); }; Route.prototype.componentWillMount = function componentWillMount() { __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.component && this.props.render), "You should not use and in the same route; will be ignored"); __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.component && this.props.children && !isEmptyChildren(this.props.children)), "You should not use and in the same route; will be ignored"); __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(this.props.render && this.props.children && !isEmptyChildren(this.props.children)), "You should not use and in the same route; will be ignored"); }; Route.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextContext) { __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(nextProps.location && !this.props.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'); __WEBPACK_IMPORTED_MODULE_0_warning___default()(!(!nextProps.location && this.props.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.'); this.setState({ match: this.computeMatch(nextProps, nextContext.router) }); }; Route.prototype.render = function render() { var match = this.state.match; var _props = this.props, children = _props.children, component = _props.component, render = _props.render; var _context$router = this.context.router, history = _context$router.history, route = _context$router.route, staticContext = _context$router.staticContext; var location = this.props.location || route.location; var props = { match: match, location: location, history: history, staticContext: staticContext }; if (component) return match ? __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(component, props) : null; if (render) return match ? render(props) : null; if (typeof children === "function") return children(props); if (children && !isEmptyChildren(children)) return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(children); return null; }; return Route; }(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component); Route.propTypes = { computedMatch: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object, // private, from path: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.string, exact: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool, strict: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool, sensitive: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.bool, component: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, render: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, children: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.node]), location: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object }; Route.contextTypes = { router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.shape({ history: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired, route: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired, staticContext: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object }) }; Route.childContextTypes = { router: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.object.isRequired }; /* harmony default export */ __webpack_exports__["a"] = (Route); /***/ }), /* 135 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp__ = __webpack_require__(219); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path_to_regexp__); var patternCache = {}; var cacheLimit = 10000; var cacheCount = 0; var compileGenerator = function compileGenerator(pattern) { var cacheKey = pattern; var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {}); if (cache[pattern]) return cache[pattern]; var compiledGenerator = __WEBPACK_IMPORTED_MODULE_0_path_to_regexp___default.a.compile(pattern); if (cacheCount < cacheLimit) { cache[pattern] = compiledGenerator; cacheCount++; } return compiledGenerator; }; /** * Public API for generating a URL pathname from a pattern and parameters. */ var generatePath = function generatePath() { var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "/"; var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; if (pattern === "/") { return pattern; } var generator = compileGenerator(pattern); return generator(params, { pretty: true }); }; /* harmony default export */ __webpack_exports__["a"] = (generatePath); /***/ }), /* 136 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(process) { var utils = __webpack_require__(36); var normalizeHeaderName = __webpack_require__(455); var DEFAULT_CONTENT_TYPE = { 'Content-Type': 'application/x-www-form-urlencoded' }; function setContentTypeIfUnset(headers, value) { if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { headers['Content-Type'] = value; } } function getDefaultAdapter() { var adapter; if (typeof XMLHttpRequest !== 'undefined') { // For browsers use XHR adapter adapter = __webpack_require__(226); } else if (typeof process !== 'undefined') { // For node use HTTP adapter adapter = __webpack_require__(226); } return adapter; } var defaults = { adapter: getDefaultAdapter(), transformRequest: [function transformRequest(data, headers) { normalizeHeaderName(headers, 'Content-Type'); if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data) ) { return data; } if (utils.isArrayBufferView(data)) { return data.buffer; } if (utils.isURLSearchParams(data)) { setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); return data.toString(); } if (utils.isObject(data)) { setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); return JSON.stringify(data); } return data; }], transformResponse: [function transformResponse(data) { /*eslint no-param-reassign:0*/ if (typeof data === 'string') { try { data = JSON.parse(data); } catch (e) { /* Ignore */ } } return data; }], /** * A timeout in milliseconds to abort a request. If set to 0 (default) a * timeout is not created. */ timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, validateStatus: function validateStatus(status) { return status >= 200 && status < 300; } }; defaults.headers = { common: { 'Accept': 'application/json, text/plain, */*' } }; utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { defaults.headers[method] = {}; }); utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); }); module.exports = defaults; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(93))) /***/ }), /* 137 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __webpack_require__(44); // instead of the ES6 spec version, we didn't implement @@toPrimitive case // and the second argument - flag - preferred type is a string module.exports = function (it, S) { if (!isObject(it)) return it; var fn, val; if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }), /* 138 */ /***/ (function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = __webpack_require__(139); // eslint-disable-next-line no-prototype-builtins module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }), /* 139 */ /***/ (function(module, exports) { var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; /***/ }), /* 140 */ /***/ (function(module, exports) { // 7.2.1 RequireObjectCoercible(argument) module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; /***/ }), /* 141 */ /***/ (function(module, exports) { // 7.1.4 ToInteger var ceil = Math.ceil; var floor = Math.floor; module.exports = function (it) { return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; /***/ }), /* 142 */ /***/ (function(module, exports, __webpack_require__) { var shared = __webpack_require__(143)('keys'); var uid = __webpack_require__(102); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); }; /***/ }), /* 143 */ /***/ (function(module, exports, __webpack_require__) { var core = __webpack_require__(16); var global = __webpack_require__(40); var SHARED = '__core-js_shared__'; var store = global[SHARED] || (global[SHARED] = {}); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ version: core.version, mode: __webpack_require__(101) ? 'pure' : 'global', copyright: '© 2019 Denis Pushkarev (zloirock.ru)' }); /***/ }), /* 144 */ /***/ (function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }), /* 145 */ /***/ (function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }), /* 146 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var LIBRARY = __webpack_require__(101); var $export = __webpack_require__(30); var redefine = __webpack_require__(238); var hide = __webpack_require__(48); var Iterators = __webpack_require__(66); var $iterCreate = __webpack_require__(482); var setToStringTag = __webpack_require__(104); var getPrototypeOf = __webpack_require__(239); var ITERATOR = __webpack_require__(32)('iterator'); var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` var FF_ITERATOR = '@@iterator'; var KEYS = 'keys'; var VALUES = 'values'; var returnThis = function () { return this; }; module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { $iterCreate(Constructor, NAME, next); var getMethod = function (kind) { if (!BUGGY && kind in proto) return proto[kind]; switch (kind) { case KEYS: return function keys() { return new Constructor(this, kind); }; case VALUES: return function values() { return new Constructor(this, kind); }; } return function entries() { return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator'; var DEF_VALUES = DEFAULT == VALUES; var VALUES_BUG = false; var proto = Base.prototype; var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; var $default = $native || getMethod(DEFAULT); var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; var methods, key, IteratorPrototype; // Fix native if ($anyNative) { IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { // Set @@toStringTag to native iterators setToStringTag(IteratorPrototype, TAG, true); // fix for some old engines if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); } } // fix Array#{values, @@iterator}.name in V8 / FF if (DEF_VALUES && $native && $native.name !== VALUES) { VALUES_BUG = true; $default = function values() { return $native.call(this); }; } // Define iterator if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { hide(proto, ITERATOR, $default); } // Plug for library Iterators[NAME] = $default; Iterators[TAG] = returnThis; if (DEFAULT) { methods = { values: DEF_VALUES ? $default : getMethod(VALUES), keys: IS_SET ? $default : getMethod(KEYS), entries: $entries }; if (FORCED) for (key in methods) { if (!(key in proto)) redefine(proto, key, methods[key]); } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); } return methods; }; /***/ }), /* 147 */ /***/ (function(module, exports, __webpack_require__) { exports.f = __webpack_require__(32); /***/ }), /* 148 */ /***/ (function(module, exports, __webpack_require__) { var META = __webpack_require__(102)('meta'); var isObject = __webpack_require__(44); var has = __webpack_require__(57); var setDesc = __webpack_require__(37).f; var id = 0; var isExtensible = Object.isExtensible || function () { return true; }; var FREEZE = !__webpack_require__(56)(function () { return isExtensible(Object.preventExtensions({})); }); var setMeta = function (it) { setDesc(it, META, { value: { i: 'O' + ++id, // object ID w: {} // weak collections IDs } }); }; var fastKey = function (it, create) { // return primitive with prefix if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return 'F'; // not necessary to add metadata if (!create) return 'E'; // add missing metadata setMeta(it); // return object ID } return it[META].i; }; var getWeak = function (it, create) { if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return true; // not necessary to add metadata if (!create) return false; // add missing metadata setMeta(it); // return hash weak collections IDs } return it[META].w; }; // add metadata on freeze-family methods calling var onFreeze = function (it) { if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); return it; }; var meta = module.exports = { KEY: META, NEED: false, fastKey: fastKey, getWeak: getWeak, onFreeze: onFreeze }; /***/ }), /* 149 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(40); var core = __webpack_require__(16); var LIBRARY = __webpack_require__(101); var wksExt = __webpack_require__(147); var defineProperty = __webpack_require__(37).f; module.exports = function (name) { var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); }; /***/ }), /* 150 */ /***/ (function(module, exports, __webpack_require__) { var pIE = __webpack_require__(95); var createDesc = __webpack_require__(82); var toIObject = __webpack_require__(52); var toPrimitive = __webpack_require__(137); var has = __webpack_require__(57); var IE8_DOM_DEFINE = __webpack_require__(234); var gOPD = Object.getOwnPropertyDescriptor; exports.f = __webpack_require__(41) ? gOPD : function getOwnPropertyDescriptor(O, P) { O = toIObject(O); P = toPrimitive(P, true); if (IE8_DOM_DEFINE) try { return gOPD(O, P); } catch (e) { /* empty */ } if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); }; /***/ }), /* 151 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(232); /***/ }), /* 152 */ /***/ (function(module, exports, __webpack_require__) { // most Object methods by ES6 should accept primitives var $export = __webpack_require__(30); var core = __webpack_require__(16); var fails = __webpack_require__(56); module.exports = function (KEY, exec) { var fn = (core.Object || {})[KEY] || Object[KEY]; var exp = {}; exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp); }; /***/ }), /* 153 */ /***/ (function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() var cof = __webpack_require__(139); var TAG = __webpack_require__(32)('toStringTag'); // ES3 wrong here var ARG = cof(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (e) { /* empty */ } }; module.exports = function (it) { var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; /***/ }), /* 154 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /** * Copyright 2015, Yahoo! Inc. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ var REACT_STATICS = { childContextTypes: true, contextTypes: true, defaultProps: true, displayName: true, getDefaultProps: true, getDerivedStateFromProps: true, mixins: true, propTypes: true, type: true }; var KNOWN_STATICS = { name: true, length: true, prototype: true, caller: true, callee: true, arguments: true, arity: true }; var defineProperty = Object.defineProperty; var getOwnPropertyNames = Object.getOwnPropertyNames; var getOwnPropertySymbols = Object.getOwnPropertySymbols; var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var getPrototypeOf = Object.getPrototypeOf; var objectPrototype = getPrototypeOf && getPrototypeOf(Object); function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components if (objectPrototype) { var inheritedComponent = getPrototypeOf(sourceComponent); if (inheritedComponent && inheritedComponent !== objectPrototype) { hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); } } var keys = getOwnPropertyNames(sourceComponent); if (getOwnPropertySymbols) { keys = keys.concat(getOwnPropertySymbols(sourceComponent)); } for (var i = 0; i < keys.length; ++i) { var key = keys[i]; if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) { var descriptor = getOwnPropertyDescriptor(sourceComponent, key); try { // Avoid failures from read-only properties defineProperty(targetComponent, key, descriptor); } catch (e) {} } } return targetComponent; } return targetComponent; } module.exports = hoistNonReactStatics; /***/ }), /* 155 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports['default'] = toCss; var _toCssValue = __webpack_require__(106); var _toCssValue2 = _interopRequireDefault(_toCssValue); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * Indent a string. * http://jsperf.com/array-join-vs-for */ function indentStr(str, indent) { var result = ''; for (var index = 0; index < indent; index++) { result += ' '; }return result + str; } /** * Converts a Rule to CSS string. */ function toCss(selector, style) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var result = ''; if (!style) return result; var _options$indent = options.indent, indent = _options$indent === undefined ? 0 : _options$indent; var fallbacks = style.fallbacks; indent++; // Apply fallbacks first. if (fallbacks) { // Array syntax {fallbacks: [{prop: value}]} if (Array.isArray(fallbacks)) { for (var index = 0; index < fallbacks.length; index++) { var fallback = fallbacks[index]; for (var prop in fallback) { var value = fallback[prop]; if (value != null) { result += '\n' + indentStr(prop + ': ' + (0, _toCssValue2['default'])(value) + ';', indent); } } } } else { // Object syntax {fallbacks: {prop: value}} for (var _prop in fallbacks) { var _value = fallbacks[_prop]; if (_value != null) { result += '\n' + indentStr(_prop + ': ' + (0, _toCssValue2['default'])(_value) + ';', indent); } } } } for (var _prop2 in style) { var _value2 = style[_prop2]; if (_value2 != null && _prop2 !== 'fallbacks') { result += '\n' + indentStr(_prop2 + ': ' + (0, _toCssValue2['default'])(_value2) + ';', indent); } } // Allow empty style in this case, because properties will be added dynamically. if (!result && !options.allowEmpty) return result; indent--; result = indentStr(selector + ' {' + result + '\n', indent) + indentStr('}', indent); return result; } /***/ }), /* 156 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _SheetsRegistry = __webpack_require__(261); var _SheetsRegistry2 = _interopRequireDefault(_SheetsRegistry); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * This is a global sheets registry. Only DomRenderer will add sheets to it. * On the server one should use an own SheetsRegistry instance and add the * sheets to it, because you need to make sure to create a new registry for * each request in order to not leak sheets across requests. */ exports['default'] = new _SheetsRegistry2['default'](); /***/ }), /* 157 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _isInBrowser = __webpack_require__(108); var _isInBrowser2 = _interopRequireDefault(_isInBrowser); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var js = ''; /** * Export javascript style and css style vendor prefixes. * Based on "transform" support test. */ var css = ''; // We should not do anything if required serverside. if (_isInBrowser2['default']) { // Order matters. We need to check Webkit the last one because // other vendors use to add Webkit prefixes to some properties var jsCssMap = { Moz: '-moz-', // IE did it wrong again ... ms: '-ms-', O: '-o-', Webkit: '-webkit-' }; var style = document.createElement('p').style; var testProp = 'Transform'; for (var key in jsCssMap) { if (key + testProp in style) { js = key; css = jsCssMap[key]; break; } } } /** * Vendor prefix string for the current browser. * * @type {{js: String, css: String}} * @api public */ exports['default'] = { js: js, css: css }; /***/ }), /* 158 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(2); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _objectSpread2 = _interopRequireDefault(__webpack_require__(26)); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(6)); var _deepmerge = _interopRequireDefault(__webpack_require__(109)); var _warning = _interopRequireDefault(__webpack_require__(15)); var _createTypography = _interopRequireDefault(__webpack_require__(574)); var _createBreakpoints = _interopRequireDefault(__webpack_require__(267)); var _createPalette = _interopRequireDefault(__webpack_require__(575)); var _createMixins = _interopRequireDefault(__webpack_require__(576)); var _shadows = _interopRequireDefault(__webpack_require__(577)); var _transitions = _interopRequireDefault(__webpack_require__(81)); var _zIndex = _interopRequireDefault(__webpack_require__(581)); var _spacing = _interopRequireDefault(__webpack_require__(582)); // < 1kb payload overhead when lodash/merge is > 3kb. function createMuiTheme() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var _options$palette = options.palette, paletteInput = _options$palette === void 0 ? {} : _options$palette, _options$breakpoints = options.breakpoints, breakpointsInput = _options$breakpoints === void 0 ? {} : _options$breakpoints, _options$mixins = options.mixins, mixinsInput = _options$mixins === void 0 ? {} : _options$mixins, _options$typography = options.typography, typographyInput = _options$typography === void 0 ? {} : _options$typography, shadowsInput = options.shadows, other = (0, _objectWithoutProperties2.default)(options, ["palette", "breakpoints", "mixins", "typography", "shadows"]); var palette = (0, _createPalette.default)(paletteInput); var breakpoints = (0, _createBreakpoints.default)(breakpointsInput); var muiTheme = (0, _objectSpread2.default)({ breakpoints: breakpoints, direction: 'ltr', mixins: (0, _createMixins.default)(breakpoints, _spacing.default, mixinsInput), overrides: {}, // Inject custom styles palette: palette, props: {}, // Inject custom properties shadows: shadowsInput || _shadows.default, typography: (0, _createTypography.default)(palette, typographyInput) }, (0, _deepmerge.default)({ transitions: _transitions.default, spacing: _spacing.default, zIndex: _zIndex.default }, other)); false ? (0, _warning.default)(muiTheme.shadows.length === 25, 'Material-UI: the shadows array provided to createMuiTheme should support 25 elevations.') : void 0; return muiTheme; } var _default = createMuiTheme; exports.default = _default; /***/ }), /* 159 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(2); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.CHANNEL = void 0; var _defineProperty2 = _interopRequireDefault(__webpack_require__(21)); var _propTypes = _interopRequireDefault(__webpack_require__(1)); // Same value used by react-jss var CHANNEL = '__THEMING__'; exports.CHANNEL = CHANNEL; var themeListener = { contextTypes: (0, _defineProperty2.default)({}, CHANNEL, _propTypes.default.object), initial: function initial(context) { if (!context[CHANNEL]) { return null; } return context[CHANNEL].getState(); }, subscribe: function subscribe(context, cb) { if (!context[CHANNEL]) { return null; } return context[CHANNEL].subscribe(cb); }, unsubscribe: function unsubscribe(context, subscriptionId) { if (context[CHANNEL]) { context[CHANNEL].unsubscribe(subscriptionId); } } }; var _default = themeListener; exports.default = _default; /***/ }), /* 160 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(2); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exactProp; exports.specialProperty = void 0; var _defineProperty2 = _interopRequireDefault(__webpack_require__(21)); var _keys = _interopRequireDefault(__webpack_require__(49)); var _objectSpread3 = _interopRequireDefault(__webpack_require__(26)); // This module is based on https://github.com/airbnb/prop-types-exact repository. // However, in order to reduce the number of dependencies and to remove some extra safe checks // the module was forked. var specialProperty = "exact-prop: \u200B"; exports.specialProperty = specialProperty; function exactProp(propTypes, componentNameInError) { return (0, _objectSpread3.default)({}, propTypes, (0, _defineProperty2.default)({}, specialProperty, function (props) { var unknownProps = (0, _keys.default)(props).filter(function (prop) { return !propTypes.hasOwnProperty(prop); }); if (unknownProps.length > 0) { return new TypeError("".concat(componentNameInError, ": unknown props found: ").concat(unknownProps.join(', '), ". Please remove the unknown properties.")); } return null; })); } /***/ }), /* 161 */ /***/ (function(module, exports, __webpack_require__) { (function(){ var crypt = __webpack_require__(654), utf8 = __webpack_require__(275).utf8, isBuffer = __webpack_require__(655), bin = __webpack_require__(275).bin, // The core md5 = function (message, options) { // Convert to byte array if (message.constructor == String) if (options && options.encoding === 'binary') message = bin.stringToBytes(message); else message = utf8.stringToBytes(message); else if (isBuffer(message)) message = Array.prototype.slice.call(message, 0); else if (!Array.isArray(message)) message = message.toString(); // else, assume byte array already var m = crypt.bytesToWords(message), l = message.length * 8, a = 1732584193, b = -271733879, c = -1732584194, d = 271733878; // Swap endian for (var i = 0; i < m.length; i++) { m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF | ((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00; } // Padding m[l >>> 5] |= 0x80 << (l % 32); m[(((l + 64) >>> 9) << 4) + 14] = l; // Method shortcuts var FF = md5._ff, GG = md5._gg, HH = md5._hh, II = md5._ii; for (var i = 0; i < m.length; i += 16) { var aa = a, bb = b, cc = c, dd = d; a = FF(a, b, c, d, m[i+ 0], 7, -680876936); d = FF(d, a, b, c, m[i+ 1], 12, -389564586); c = FF(c, d, a, b, m[i+ 2], 17, 606105819); b = FF(b, c, d, a, m[i+ 3], 22, -1044525330); a = FF(a, b, c, d, m[i+ 4], 7, -176418897); d = FF(d, a, b, c, m[i+ 5], 12, 1200080426); c = FF(c, d, a, b, m[i+ 6], 17, -1473231341); b = FF(b, c, d, a, m[i+ 7], 22, -45705983); a = FF(a, b, c, d, m[i+ 8], 7, 1770035416); d = FF(d, a, b, c, m[i+ 9], 12, -1958414417); c = FF(c, d, a, b, m[i+10], 17, -42063); b = FF(b, c, d, a, m[i+11], 22, -1990404162); a = FF(a, b, c, d, m[i+12], 7, 1804603682); d = FF(d, a, b, c, m[i+13], 12, -40341101); c = FF(c, d, a, b, m[i+14], 17, -1502002290); b = FF(b, c, d, a, m[i+15], 22, 1236535329); a = GG(a, b, c, d, m[i+ 1], 5, -165796510); d = GG(d, a, b, c, m[i+ 6], 9, -1069501632); c = GG(c, d, a, b, m[i+11], 14, 643717713); b = GG(b, c, d, a, m[i+ 0], 20, -373897302); a = GG(a, b, c, d, m[i+ 5], 5, -701558691); d = GG(d, a, b, c, m[i+10], 9, 38016083); c = GG(c, d, a, b, m[i+15], 14, -660478335); b = GG(b, c, d, a, m[i+ 4], 20, -405537848); a = GG(a, b, c, d, m[i+ 9], 5, 568446438); d = GG(d, a, b, c, m[i+14], 9, -1019803690); c = GG(c, d, a, b, m[i+ 3], 14, -187363961); b = GG(b, c, d, a, m[i+ 8], 20, 1163531501); a = GG(a, b, c, d, m[i+13], 5, -1444681467); d = GG(d, a, b, c, m[i+ 2], 9, -51403784); c = GG(c, d, a, b, m[i+ 7], 14, 1735328473); b = GG(b, c, d, a, m[i+12], 20, -1926607734); a = HH(a, b, c, d, m[i+ 5], 4, -378558); d = HH(d, a, b, c, m[i+ 8], 11, -2022574463); c = HH(c, d, a, b, m[i+11], 16, 1839030562); b = HH(b, c, d, a, m[i+14], 23, -35309556); a = HH(a, b, c, d, m[i+ 1], 4, -1530992060); d = HH(d, a, b, c, m[i+ 4], 11, 1272893353); c = HH(c, d, a, b, m[i+ 7], 16, -155497632); b = HH(b, c, d, a, m[i+10], 23, -1094730640); a = HH(a, b, c, d, m[i+13], 4, 681279174); d = HH(d, a, b, c, m[i+ 0], 11, -358537222); c = HH(c, d, a, b, m[i+ 3], 16, -722521979); b = HH(b, c, d, a, m[i+ 6], 23, 76029189); a = HH(a, b, c, d, m[i+ 9], 4, -640364487); d = HH(d, a, b, c, m[i+12], 11, -421815835); c = HH(c, d, a, b, m[i+15], 16, 530742520); b = HH(b, c, d, a, m[i+ 2], 23, -995338651); a = II(a, b, c, d, m[i+ 0], 6, -198630844); d = II(d, a, b, c, m[i+ 7], 10, 1126891415); c = II(c, d, a, b, m[i+14], 15, -1416354905); b = II(b, c, d, a, m[i+ 5], 21, -57434055); a = II(a, b, c, d, m[i+12], 6, 1700485571); d = II(d, a, b, c, m[i+ 3], 10, -1894986606); c = II(c, d, a, b, m[i+10], 15, -1051523); b = II(b, c, d, a, m[i+ 1], 21, -2054922799); a = II(a, b, c, d, m[i+ 8], 6, 1873313359); d = II(d, a, b, c, m[i+15], 10, -30611744); c = II(c, d, a, b, m[i+ 6], 15, -1560198380); b = II(b, c, d, a, m[i+13], 21, 1309151649); a = II(a, b, c, d, m[i+ 4], 6, -145523070); d = II(d, a, b, c, m[i+11], 10, -1120210379); c = II(c, d, a, b, m[i+ 2], 15, 718787259); b = II(b, c, d, a, m[i+ 9], 21, -343485551); a = (a + aa) >>> 0; b = (b + bb) >>> 0; c = (c + cc) >>> 0; d = (d + dd) >>> 0; } return crypt.endian([a, b, c, d]); }; // Auxiliary functions md5._ff = function (a, b, c, d, x, s, t) { var n = a + (b & c | ~b & d) + (x >>> 0) + t; return ((n << s) | (n >>> (32 - s))) + b; }; md5._gg = function (a, b, c, d, x, s, t) { var n = a + (b & d | c & ~d) + (x >>> 0) + t; return ((n << s) | (n >>> (32 - s))) + b; }; md5._hh = function (a, b, c, d, x, s, t) { var n = a + (b ^ c ^ d) + (x >>> 0) + t; return ((n << s) | (n >>> (32 - s))) + b; }; md5._ii = function (a, b, c, d, x, s, t) { var n = a + (c ^ (b | ~d)) + (x >>> 0) + t; return ((n << s) | (n >>> (32 - s))) + b; }; // Package private blocksize md5._blocksize = 16; md5._digestsize = 16; module.exports = function (message, options) { if (message === undefined || message === null) throw new Error('Illegal argument ' + message); var digestbytes = crypt.wordsToBytes(md5(message, options)); return options && options.asBytes ? digestbytes : options && options.asString ? bin.bytesToString(digestbytes) : crypt.bytesToHex(digestbytes); }; })(); /***/ }), /* 162 */ /***/ (function(module, exports, __webpack_require__) { (function (global, factory) { true ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global.arrayTreeFilter = factory()); }(this, (function () { 'use strict'; function arrayTreeFilter(data, filterFn, options) { options = options || {}; options.childrenKeyName = options.childrenKeyName || "children"; var children = data || []; var result = []; var level = 0; do { var foundItem = children.filter(function (item) { return filterFn(item, level); })[0]; if (!foundItem) { break; } result.push(foundItem); children = foundItem[options.childrenKeyName] || []; level += 1; } while (children.length > 0); return result; } return arrayTreeFilter; }))); /***/ }), /* 163 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var PropTypes = _interopRequireWildcard(__webpack_require__(1)); var _rcCheckbox = _interopRequireDefault(__webpack_require__(289)); var _classnames = _interopRequireDefault(__webpack_require__(3)); var _shallowequal = _interopRequireDefault(__webpack_require__(62)); var _configProvider = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var __rest = void 0 && (void 0).__rest || function (s, e) { var t = {}; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; } if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var Radio = /*#__PURE__*/ function (_React$Component) { _inherits(Radio, _React$Component); function Radio() { var _this; _classCallCheck(this, Radio); _this = _possibleConstructorReturn(this, _getPrototypeOf(Radio).apply(this, arguments)); _this.saveCheckbox = function (node) { _this.rcCheckbox = node; }; _this.onChange = function (e) { if (_this.props.onChange) { _this.props.onChange(e); } if (_this.context.radioGroup && _this.context.radioGroup.onChange) { _this.context.radioGroup.onChange(e); } }; _this.renderRadio = function (_ref) { var _classNames; var getPrefixCls = _ref.getPrefixCls; var _assertThisInitialize = _assertThisInitialized(_this), props = _assertThisInitialize.props, context = _assertThisInitialize.context; var customizePrefixCls = props.prefixCls, className = props.className, children = props.children, style = props.style, restProps = __rest(props, ["prefixCls", "className", "children", "style"]); var radioGroup = context.radioGroup; var prefixCls = getPrefixCls('radio', customizePrefixCls); var radioProps = _extends({}, restProps); if (radioGroup) { radioProps.name = radioGroup.name; radioProps.onChange = _this.onChange; radioProps.checked = props.value === radioGroup.value; radioProps.disabled = props.disabled || radioGroup.disabled; } var wrapperClassString = (0, _classnames["default"])(className, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-wrapper"), true), _defineProperty(_classNames, "".concat(prefixCls, "-wrapper-checked"), radioProps.checked), _defineProperty(_classNames, "".concat(prefixCls, "-wrapper-disabled"), radioProps.disabled), _classNames)); return (// eslint-disable-next-line jsx-a11y/label-has-associated-control React.createElement("label", { className: wrapperClassString, style: style, onMouseEnter: props.onMouseEnter, onMouseLeave: props.onMouseLeave }, React.createElement(_rcCheckbox["default"], _extends({}, radioProps, { prefixCls: prefixCls, ref: _this.saveCheckbox })), children !== undefined ? React.createElement("span", null, children) : null) ); }; return _this; } _createClass(Radio, [{ key: "shouldComponentUpdate", value: function shouldComponentUpdate(nextProps, nextState, nextContext) { return !(0, _shallowequal["default"])(this.props, nextProps) || !(0, _shallowequal["default"])(this.state, nextState) || !(0, _shallowequal["default"])(this.context.radioGroup, nextContext.radioGroup); } }, { key: "focus", value: function focus() { this.rcCheckbox.focus(); } }, { key: "blur", value: function blur() { this.rcCheckbox.blur(); } }, { key: "render", value: function render() { return React.createElement(_configProvider.ConfigConsumer, null, this.renderRadio); } }]); return Radio; }(React.Component); exports["default"] = Radio; Radio.defaultProps = { type: 'radio' }; Radio.contextTypes = { radioGroup: PropTypes.any }; //# sourceMappingURL=radio.js.map /***/ }), /* 164 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["u"] = toTitle; /* harmony export (immutable) */ __webpack_exports__["k"] = getValuePropValue; /* harmony export (immutable) */ __webpack_exports__["i"] = getPropValue; /* unused harmony export isMultiple */ /* harmony export (immutable) */ __webpack_exports__["m"] = isCombobox; /* harmony export (immutable) */ __webpack_exports__["n"] = isMultipleOrTags; /* harmony export (immutable) */ __webpack_exports__["o"] = isMultipleOrTagsOrCombobox; /* harmony export (immutable) */ __webpack_exports__["p"] = isSingleMode; /* harmony export (immutable) */ __webpack_exports__["t"] = toArray; /* harmony export (immutable) */ __webpack_exports__["h"] = getMapKey; /* harmony export (immutable) */ __webpack_exports__["q"] = preventDefaultEvent; /* harmony export (immutable) */ __webpack_exports__["e"] = findIndexInValueBySingleValue; /* harmony export (immutable) */ __webpack_exports__["g"] = getLabelFromPropsValue; /* harmony export (immutable) */ __webpack_exports__["j"] = getSelectKeys; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return UNSELECTABLE_STYLE; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return UNSELECTABLE_ATTRIBUTE; }); /* harmony export (immutable) */ __webpack_exports__["d"] = findFirstMenuItem; /* harmony export (immutable) */ __webpack_exports__["l"] = includesSeparators; /* harmony export (immutable) */ __webpack_exports__["s"] = splitBySeparators; /* harmony export (immutable) */ __webpack_exports__["c"] = defaultFilterFn; /* harmony export (immutable) */ __webpack_exports__["v"] = validateOptionValue; /* harmony export (immutable) */ __webpack_exports__["r"] = saveRef; /* harmony export (immutable) */ __webpack_exports__["f"] = generateUUID; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__); function toTitle(title) { if (typeof title === 'string') { return title; } return ''; } function getValuePropValue(child) { if (!child) { return null; } var props = child.props; if ('value' in props) { return props.value; } if (child.key) { return child.key; } if (child.type && child.type.isSelectOptGroup && props.label) { return props.label; } throw new Error("Need at least a key or a value or a label (only for OptGroup) for ".concat(child)); } function getPropValue(child, prop) { if (prop === 'value') { return getValuePropValue(child); } return child.props[prop]; } function isMultiple(props) { return props.multiple; } function isCombobox(props) { return props.combobox; } function isMultipleOrTags(props) { return props.multiple || props.tags; } function isMultipleOrTagsOrCombobox(props) { return isMultipleOrTags(props) || isCombobox(props); } function isSingleMode(props) { return !isMultipleOrTagsOrCombobox(props); } function toArray(value) { var ret = value; if (value === undefined) { ret = []; } else if (!Array.isArray(value)) { ret = [value]; } return ret; } function getMapKey(value) { return "".concat(typeof value, "-").concat(value); } function preventDefaultEvent(e) { e.preventDefault(); } function findIndexInValueBySingleValue(value, singleValue) { var index = -1; if (value) { for (var i = 0; i < value.length; i++) { if (value[i] === singleValue) { index = i; break; } } } return index; } function getLabelFromPropsValue(value, key) { var label; value = toArray(value); if (value) { // tslint:disable-next-line:prefer-for-of for (var i = 0; i < value.length; i++) { if (value[i].key === key) { label = value[i].label; break; } } } return label; } function getSelectKeys(menuItems, value) { if (value === null || value === undefined) { return []; } var selectedKeys = []; __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(menuItems, function (item) { var type = item.type; if (type.isMenuItemGroup) { selectedKeys = selectedKeys.concat(getSelectKeys(item.props.children, value)); } else { var itemValue = getValuePropValue(item); var itemKey = item.key; if (findIndexInValueBySingleValue(value, itemValue) !== -1 && itemKey) { selectedKeys.push(itemKey); } } }); return selectedKeys; } var UNSELECTABLE_STYLE = { userSelect: 'none', WebkitUserSelect: 'none' }; var UNSELECTABLE_ATTRIBUTE = { unselectable: 'on' }; function findFirstMenuItem(children) { // tslint:disable-next-line:prefer-for-of for (var i = 0; i < children.length; i++) { var child = children[i]; if (child.type.isMenuItemGroup) { var found = findFirstMenuItem(child.props.children); if (found) { return found; } } else if (!child.props.disabled) { return child; } } return null; } function includesSeparators(str, separators) { // tslint:disable-next-line:prefer-for-of for (var i = 0; i < separators.length; ++i) { if (str.lastIndexOf(separators[i]) > 0) { return true; } } return false; } function splitBySeparators(str, separators) { var reg = new RegExp("[".concat(separators.join(), "]")); return str.split(reg).filter(function (token) { return token; }); } function defaultFilterFn(input, child) { if (child.props.disabled) { return false; } var value = toArray(getPropValue(child, this.props.optionFilterProp)).join(''); return value.toLowerCase().indexOf(input.toLowerCase()) > -1; } function validateOptionValue(value, props) { if (isSingleMode(props) || isMultiple(props)) { return; } if (typeof value !== 'string') { throw new Error("Invalid `value` of type `".concat(typeof value, "` supplied to Option, ") + "expected `string` when `tags/combobox` is `true`."); } } function saveRef(instance, name) { return function (node) { instance[name] = node; }; } function generateUUID() { if (false) { return 'test-uuid'; } var d = new Date().getTime(); var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { // tslint:disable-next-line:no-bitwise var r = (d + Math.random() * 16) % 16 | 0; d = Math.floor(d / 16); // tslint:disable-next-line:no-bitwise return (c === 'x' ? r : r & 0x7 | 0x8).toString(16); }); return uuid; } /***/ }), /* 165 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = exports.YouTube = void 0; var _react = _interopRequireWildcard(__webpack_require__(0)); var _utils = __webpack_require__(33); var _singlePlayer = _interopRequireDefault(__webpack_require__(42)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var SDK_URL = 'https://www.youtube.com/iframe_api'; var SDK_GLOBAL = 'YT'; var SDK_GLOBAL_READY = 'onYouTubeIframeAPIReady'; var MATCH_URL = /(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})|youtube\.com\/playlist\?list=/; var MATCH_PLAYLIST = /list=([a-zA-Z0-9_-]+)/; function parsePlaylist(url) { if (MATCH_PLAYLIST.test(url)) { var _url$match = url.match(MATCH_PLAYLIST), _url$match2 = _slicedToArray(_url$match, 2), playlistId = _url$match2[1]; return { listType: 'playlist', list: playlistId }; } return {}; } var YouTube = /*#__PURE__*/ function (_Component) { _inherits(YouTube, _Component); function YouTube() { var _getPrototypeOf2; var _this; _classCallCheck(this, YouTube); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(YouTube)).call.apply(_getPrototypeOf2, [this].concat(args))); _defineProperty(_assertThisInitialized(_this), "callPlayer", _utils.callPlayer); _defineProperty(_assertThisInitialized(_this), "onStateChange", function (_ref) { var data = _ref.data; var _this$props = _this.props, onPlay = _this$props.onPlay, onPause = _this$props.onPause, onBuffer = _this$props.onBuffer, onBufferEnd = _this$props.onBufferEnd, onEnded = _this$props.onEnded, onReady = _this$props.onReady, loop = _this$props.loop; var _window$SDK_GLOBAL$Pl = window[SDK_GLOBAL].PlayerState, PLAYING = _window$SDK_GLOBAL$Pl.PLAYING, PAUSED = _window$SDK_GLOBAL$Pl.PAUSED, BUFFERING = _window$SDK_GLOBAL$Pl.BUFFERING, ENDED = _window$SDK_GLOBAL$Pl.ENDED, CUED = _window$SDK_GLOBAL$Pl.CUED; if (data === PLAYING) { onPlay(); onBufferEnd(); } if (data === PAUSED) onPause(); if (data === BUFFERING) onBuffer(); if (data === ENDED) { var isPlaylist = !!_this.callPlayer('getPlaylist'); if (loop && !isPlaylist) { _this.play(); // Only loop manually if not playing a playlist } onEnded(); } if (data === CUED) onReady(); }); _defineProperty(_assertThisInitialized(_this), "mute", function () { _this.callPlayer('mute'); }); _defineProperty(_assertThisInitialized(_this), "unmute", function () { _this.callPlayer('unMute'); }); _defineProperty(_assertThisInitialized(_this), "ref", function (container) { _this.container = container; }); return _this; } _createClass(YouTube, [{ key: "load", value: function load(url, isReady) { var _this2 = this; var _this$props2 = this.props, playing = _this$props2.playing, muted = _this$props2.muted, playsinline = _this$props2.playsinline, controls = _this$props2.controls, loop = _this$props2.loop, config = _this$props2.config, _onError = _this$props2.onError; var _config$youtube = config.youtube, playerVars = _config$youtube.playerVars, embedOptions = _config$youtube.embedOptions; var id = url && url.match(MATCH_URL)[1]; if (isReady) { if (MATCH_PLAYLIST.test(url)) { this.player.loadPlaylist(parsePlaylist(url)); return; } this.player.cueVideoById({ videoId: id, startSeconds: (0, _utils.parseStartTime)(url) || playerVars.start, endSeconds: (0, _utils.parseEndTime)(url) || playerVars.end }); return; } (0, _utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY, function (YT) { return YT.loaded; }).then(function (YT) { if (!_this2.container) return; _this2.player = new YT.Player(_this2.container, _objectSpread({ width: '100%', height: '100%', videoId: id, playerVars: _objectSpread({ autoplay: playing ? 1 : 0, mute: muted ? 1 : 0, controls: controls ? 1 : 0, start: (0, _utils.parseStartTime)(url), end: (0, _utils.parseEndTime)(url), origin: window.location.origin, playsinline: playsinline }, parsePlaylist(url), {}, playerVars), events: { onReady: function onReady() { if (loop) { _this2.player.setLoop(true); // Enable playlist looping } _this2.props.onReady(); }, onStateChange: _this2.onStateChange, onError: function onError(event) { return _onError(event.data); } } }, embedOptions)); }, _onError); } }, { key: "play", value: function play() { this.callPlayer('playVideo'); } }, { key: "pause", value: function pause() { this.callPlayer('pauseVideo'); } }, { key: "stop", value: function stop() { if (!document.body.contains(this.callPlayer('getIframe'))) return; this.callPlayer('stopVideo'); } }, { key: "seekTo", value: function seekTo(amount) { this.callPlayer('seekTo', amount); if (!this.props.playing) { this.pause(); } } }, { key: "setVolume", value: function setVolume(fraction) { this.callPlayer('setVolume', fraction * 100); } }, { key: "setPlaybackRate", value: function setPlaybackRate(rate) { this.callPlayer('setPlaybackRate', rate); } }, { key: "setLoop", value: function setLoop(loop) { this.callPlayer('setLoop', loop); } }, { key: "getDuration", value: function getDuration() { return this.callPlayer('getDuration'); } }, { key: "getCurrentTime", value: function getCurrentTime() { return this.callPlayer('getCurrentTime'); } }, { key: "getSecondsLoaded", value: function getSecondsLoaded() { return this.callPlayer('getVideoLoadedFraction') * this.getDuration(); } }, { key: "render", value: function render() { var display = this.props.display; var style = { width: '100%', height: '100%', display: display }; return _react["default"].createElement("div", { style: style }, _react["default"].createElement("div", { ref: this.ref })); } }]); return YouTube; }(_react.Component); exports.YouTube = YouTube; _defineProperty(YouTube, "displayName", 'YouTube'); _defineProperty(YouTube, "canPlay", function (url) { return MATCH_URL.test(url); }); var _default = (0, _singlePlayer["default"])(YouTube); exports["default"] = _default; /***/ }), /* 166 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _react = _interopRequireWildcard(__webpack_require__(0)); var _props = __webpack_require__(112); var _utils = __webpack_require__(33); function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var SEEK_ON_PLAY_EXPIRY = 5000; var Player = /*#__PURE__*/ function (_Component) { _inherits(Player, _Component); function Player() { var _getPrototypeOf2; var _this; _classCallCheck(this, Player); for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) { _args[_key] = arguments[_key]; } _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Player)).call.apply(_getPrototypeOf2, [this].concat(_args))); _defineProperty(_assertThisInitialized(_this), "mounted", false); _defineProperty(_assertThisInitialized(_this), "isReady", false); _defineProperty(_assertThisInitialized(_this), "isPlaying", false); _defineProperty(_assertThisInitialized(_this), "isLoading", true); _defineProperty(_assertThisInitialized(_this), "loadOnReady", null); _defineProperty(_assertThisInitialized(_this), "startOnPlay", true); _defineProperty(_assertThisInitialized(_this), "seekOnPlay", null); _defineProperty(_assertThisInitialized(_this), "onDurationCalled", false); _defineProperty(_assertThisInitialized(_this), "getInternalPlayer", function (key) { if (!_this.player) return null; return _this.player[key]; }); _defineProperty(_assertThisInitialized(_this), "progress", function () { if (_this.props.url && _this.player && _this.isReady) { var playedSeconds = _this.getCurrentTime() || 0; var loadedSeconds = _this.getSecondsLoaded(); var duration = _this.getDuration(); if (duration) { var progress = { playedSeconds: playedSeconds, played: playedSeconds / duration }; if (loadedSeconds !== null) { progress.loadedSeconds = loadedSeconds; progress.loaded = loadedSeconds / duration; } // Only call onProgress if values have changed if (progress.playedSeconds !== _this.prevPlayed || progress.loadedSeconds !== _this.prevLoaded) { _this.props.onProgress(progress); } _this.prevPlayed = progress.playedSeconds; _this.prevLoaded = progress.loadedSeconds; } } _this.progressTimeout = setTimeout(_this.progress, _this.props.progressFrequency || _this.props.progressInterval); }); _defineProperty(_assertThisInitialized(_this), "handleReady", function () { if (!_this.mounted) return; _this.isReady = true; _this.isLoading = false; var _this$props = _this.props, onReady = _this$props.onReady, playing = _this$props.playing, volume = _this$props.volume, muted = _this$props.muted; onReady(); if (!muted && volume !== null) { _this.player.setVolume(volume); } if (_this.loadOnReady) { _this.player.load(_this.loadOnReady, true); _this.loadOnReady = null; } else if (playing) { _this.player.play(); } _this.handleDurationCheck(); }); _defineProperty(_assertThisInitialized(_this), "handlePlay", function () { _this.isPlaying = true; _this.isLoading = false; var _this$props2 = _this.props, onStart = _this$props2.onStart, onPlay = _this$props2.onPlay, playbackRate = _this$props2.playbackRate; if (_this.startOnPlay) { if (_this.player.setPlaybackRate && playbackRate !== 1) { _this.player.setPlaybackRate(playbackRate); } onStart(); _this.startOnPlay = false; } onPlay(); if (_this.seekOnPlay) { _this.seekTo(_this.seekOnPlay); _this.seekOnPlay = null; } _this.handleDurationCheck(); }); _defineProperty(_assertThisInitialized(_this), "handlePause", function (e) { _this.isPlaying = false; if (!_this.isLoading) { _this.props.onPause(e); } }); _defineProperty(_assertThisInitialized(_this), "handleEnded", function () { var _this$props3 = _this.props, activePlayer = _this$props3.activePlayer, loop = _this$props3.loop, onEnded = _this$props3.onEnded; if (activePlayer.loopOnEnded && loop) { _this.seekTo(0); } if (!loop) { _this.isPlaying = false; onEnded(); } }); _defineProperty(_assertThisInitialized(_this), "handleError", function () { var _this$props4; _this.isLoading = false; (_this$props4 = _this.props).onError.apply(_this$props4, arguments); }); _defineProperty(_assertThisInitialized(_this), "handleDurationCheck", function () { clearTimeout(_this.durationCheckTimeout); var duration = _this.getDuration(); if (duration) { if (!_this.onDurationCalled) { _this.props.onDuration(duration); _this.onDurationCalled = true; } } else { _this.durationCheckTimeout = setTimeout(_this.handleDurationCheck, 100); } }); _defineProperty(_assertThisInitialized(_this), "handleLoaded", function () { // Sometimes we know loading has stopped but onReady/onPlay are never called // so this provides a way for players to avoid getting stuck _this.isLoading = false; }); _defineProperty(_assertThisInitialized(_this), "ref", function (player) { if (player) { _this.player = player; } }); return _this; } _createClass(Player, [{ key: "componentDidMount", value: function componentDidMount() { this.mounted = true; this.player.load(this.props.url); this.progress(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { clearTimeout(this.progressTimeout); clearTimeout(this.durationCheckTimeout); if (this.isReady) { this.player.stop(); } if (this.player.disablePIP) { this.player.disablePIP(); } this.mounted = false; } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var _this2 = this; // Invoke player methods based on changed props var _this$props5 = this.props, url = _this$props5.url, playing = _this$props5.playing, volume = _this$props5.volume, muted = _this$props5.muted, playbackRate = _this$props5.playbackRate, pip = _this$props5.pip, loop = _this$props5.loop, activePlayer = _this$props5.activePlayer; if (!(0, _utils.isEqual)(prevProps.url, url)) { if (this.isLoading && !activePlayer.forceLoad) { console.warn("ReactPlayer: the attempt to load ".concat(url, " is being deferred until the player has loaded")); this.loadOnReady = url; return; } this.isLoading = true; this.startOnPlay = true; this.onDurationCalled = false; this.player.load(url, this.isReady); } if (!prevProps.playing && playing && !this.isPlaying) { this.player.play(); } if (prevProps.playing && !playing && this.isPlaying) { this.player.pause(); } if (!prevProps.pip && pip && this.player.enablePIP) { this.player.enablePIP(); } if (prevProps.pip && !pip && this.player.disablePIP) { this.player.disablePIP(); } if (prevProps.volume !== volume && volume !== null) { this.player.setVolume(volume); } if (prevProps.muted !== muted) { if (muted) { this.player.mute(); } else { this.player.unmute(); if (volume !== null) { // Set volume next tick to fix a bug with DailyMotion setTimeout(function () { return _this2.player.setVolume(volume); }); } } } if (prevProps.playbackRate !== playbackRate && this.player.setPlaybackRate) { this.player.setPlaybackRate(playbackRate); } if (prevProps.loop !== loop && this.player.setLoop) { this.player.setLoop(loop); } } }, { key: "getDuration", value: function getDuration() { if (!this.isReady) return null; return this.player.getDuration(); } }, { key: "getCurrentTime", value: function getCurrentTime() { if (!this.isReady) return null; return this.player.getCurrentTime(); } }, { key: "getSecondsLoaded", value: function getSecondsLoaded() { if (!this.isReady) return null; return this.player.getSecondsLoaded(); } }, { key: "seekTo", value: function seekTo(amount, type) { var _this3 = this; // When seeking before player is ready, store value and seek later if (!this.isReady && amount !== 0) { this.seekOnPlay = amount; setTimeout(function () { _this3.seekOnPlay = null; }, SEEK_ON_PLAY_EXPIRY); return; } var isFraction = !type ? amount > 0 && amount < 1 : type === 'fraction'; if (isFraction) { // Convert fraction to seconds based on duration var duration = this.player.getDuration(); if (!duration) { console.warn('ReactPlayer: could not seek using fraction – duration not yet available'); return; } this.player.seekTo(duration * amount); return; } this.player.seekTo(amount); } }, { key: "render", value: function render() { var Player = this.props.activePlayer; if (!Player) { return null; } return _react["default"].createElement(Player, _extends({}, this.props, { ref: this.ref, onReady: this.handleReady, onPlay: this.handlePlay, onPause: this.handlePause, onEnded: this.handleEnded, onLoaded: this.handleLoaded, onError: this.handleError })); } }]); return Player; }(_react.Component); exports["default"] = Player; _defineProperty(Player, "displayName", 'Player'); _defineProperty(Player, "propTypes", _props.propTypes); _defineProperty(Player, "defaultProps", _props.defaultProps); /***/ }), /* 167 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = exports.SoundCloud = void 0; var _react = _interopRequireWildcard(__webpack_require__(0)); var _utils = __webpack_require__(33); var _singlePlayer = _interopRequireDefault(__webpack_require__(42)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var SDK_URL = 'https://w.soundcloud.com/player/api.js'; var SDK_GLOBAL = 'SC'; var MATCH_URL = /(soundcloud\.com|snd\.sc)\/.+$/; var SoundCloud = /*#__PURE__*/ function (_Component) { _inherits(SoundCloud, _Component); function SoundCloud() { var _getPrototypeOf2; var _this; _classCallCheck(this, SoundCloud); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SoundCloud)).call.apply(_getPrototypeOf2, [this].concat(args))); _defineProperty(_assertThisInitialized(_this), "callPlayer", _utils.callPlayer); _defineProperty(_assertThisInitialized(_this), "duration", null); _defineProperty(_assertThisInitialized(_this), "currentTime", null); _defineProperty(_assertThisInitialized(_this), "fractionLoaded", null); _defineProperty(_assertThisInitialized(_this), "mute", function () { _this.setVolume(0); }); _defineProperty(_assertThisInitialized(_this), "unmute", function () { if (_this.props.volume !== null) { _this.setVolume(_this.props.volume); } }); _defineProperty(_assertThisInitialized(_this), "ref", function (iframe) { _this.iframe = iframe; }); return _this; } _createClass(SoundCloud, [{ key: "load", value: function load(url, isReady) { var _this2 = this; (0, _utils.getSDK)(SDK_URL, SDK_GLOBAL).then(function (SC) { if (!_this2.iframe) return; var _SC$Widget$Events = SC.Widget.Events, PLAY = _SC$Widget$Events.PLAY, PLAY_PROGRESS = _SC$Widget$Events.PLAY_PROGRESS, PAUSE = _SC$Widget$Events.PAUSE, FINISH = _SC$Widget$Events.FINISH, ERROR = _SC$Widget$Events.ERROR; if (!isReady) { _this2.player = SC.Widget(_this2.iframe); _this2.player.bind(PLAY, _this2.props.onPlay); _this2.player.bind(PAUSE, _this2.props.onPause); _this2.player.bind(PLAY_PROGRESS, function (e) { _this2.currentTime = e.currentPosition / 1000; _this2.fractionLoaded = e.loadedProgress; }); _this2.player.bind(FINISH, function () { return _this2.props.onEnded(); }); _this2.player.bind(ERROR, function (e) { return _this2.props.onError(e); }); } _this2.player.load(url, _objectSpread({}, _this2.props.config.soundcloud.options, { callback: function callback() { _this2.player.getDuration(function (duration) { _this2.duration = duration / 1000; _this2.props.onReady(); }); } })); }); } }, { key: "play", value: function play() { this.callPlayer('play'); } }, { key: "pause", value: function pause() { this.callPlayer('pause'); } }, { key: "stop", value: function stop() {// Nothing to do } }, { key: "seekTo", value: function seekTo(seconds) { this.callPlayer('seekTo', seconds * 1000); } }, { key: "setVolume", value: function setVolume(fraction) { this.callPlayer('setVolume', fraction * 100); } }, { key: "getDuration", value: function getDuration() { return this.duration; } }, { key: "getCurrentTime", value: function getCurrentTime() { return this.currentTime; } }, { key: "getSecondsLoaded", value: function getSecondsLoaded() { return this.fractionLoaded * this.duration; } }, { key: "render", value: function render() { var display = this.props.display; var style = { width: '100%', height: '100%', display: display }; return _react["default"].createElement("iframe", { ref: this.ref, src: "https://w.soundcloud.com/player/?url=".concat(encodeURIComponent(this.props.url)), style: style, frameBorder: 0, allow: "autoplay" }); } }]); return SoundCloud; }(_react.Component); exports.SoundCloud = SoundCloud; _defineProperty(SoundCloud, "displayName", 'SoundCloud'); _defineProperty(SoundCloud, "canPlay", function (url) { return MATCH_URL.test(url); }); _defineProperty(SoundCloud, "loopOnEnded", true); var _default = (0, _singlePlayer["default"])(SoundCloud); exports["default"] = _default; /***/ }), /* 168 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = exports.Vimeo = void 0; var _react = _interopRequireWildcard(__webpack_require__(0)); var _utils = __webpack_require__(33); var _singlePlayer = _interopRequireDefault(__webpack_require__(42)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var SDK_URL = 'https://player.vimeo.com/api/player.js'; var SDK_GLOBAL = 'Vimeo'; var MATCH_URL = /vimeo\.com\/.+/; var MATCH_FILE_URL = /vimeo\.com\/external\/[0-9]+\..+/; var Vimeo = /*#__PURE__*/ function (_Component) { _inherits(Vimeo, _Component); function Vimeo() { var _getPrototypeOf2; var _this; _classCallCheck(this, Vimeo); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Vimeo)).call.apply(_getPrototypeOf2, [this].concat(args))); _defineProperty(_assertThisInitialized(_this), "callPlayer", _utils.callPlayer); _defineProperty(_assertThisInitialized(_this), "duration", null); _defineProperty(_assertThisInitialized(_this), "currentTime", null); _defineProperty(_assertThisInitialized(_this), "secondsLoaded", null); _defineProperty(_assertThisInitialized(_this), "mute", function () { _this.setVolume(0); }); _defineProperty(_assertThisInitialized(_this), "unmute", function () { if (_this.props.volume !== null) { _this.setVolume(_this.props.volume); } }); _defineProperty(_assertThisInitialized(_this), "ref", function (container) { _this.container = container; }); return _this; } _createClass(Vimeo, [{ key: "load", value: function load(url) { var _this2 = this; this.duration = null; (0, _utils.getSDK)(SDK_URL, SDK_GLOBAL).then(function (Vimeo) { if (!_this2.container) return; _this2.player = new Vimeo.Player(_this2.container, _objectSpread({ url: url, autoplay: _this2.props.playing, muted: _this2.props.muted, loop: _this2.props.loop, playsinline: _this2.props.playsinline, controls: _this2.props.controls }, _this2.props.config.vimeo.playerOptions)); _this2.player.ready().then(function () { var iframe = _this2.container.querySelector('iframe'); iframe.style.width = '100%'; iframe.style.height = '100%'; })["catch"](_this2.props.onError); _this2.player.on('loaded', function () { _this2.props.onReady(); _this2.refreshDuration(); }); _this2.player.on('play', function () { _this2.props.onPlay(); _this2.refreshDuration(); }); _this2.player.on('pause', _this2.props.onPause); _this2.player.on('seeked', function (e) { return _this2.props.onSeek(e.seconds); }); _this2.player.on('ended', _this2.props.onEnded); _this2.player.on('error', _this2.props.onError); _this2.player.on('timeupdate', function (_ref) { var seconds = _ref.seconds; _this2.currentTime = seconds; }); _this2.player.on('progress', function (_ref2) { var seconds = _ref2.seconds; _this2.secondsLoaded = seconds; }); }, this.props.onError); } }, { key: "refreshDuration", value: function refreshDuration() { var _this3 = this; this.player.getDuration().then(function (duration) { _this3.duration = duration; }); } }, { key: "play", value: function play() { var promise = this.callPlayer('play'); if (promise) { promise["catch"](this.props.onError); } } }, { key: "pause", value: function pause() { this.callPlayer('pause'); } }, { key: "stop", value: function stop() { this.callPlayer('unload'); } }, { key: "seekTo", value: function seekTo(seconds) { this.callPlayer('setCurrentTime', seconds); } }, { key: "setVolume", value: function setVolume(fraction) { this.callPlayer('setVolume', fraction); } }, { key: "setLoop", value: function setLoop(loop) { this.callPlayer('setLoop', loop); } }, { key: "setPlaybackRate", value: function setPlaybackRate(rate) { this.callPlayer('setPlaybackRate', rate); } }, { key: "getDuration", value: function getDuration() { return this.duration; } }, { key: "getCurrentTime", value: function getCurrentTime() { return this.currentTime; } }, { key: "getSecondsLoaded", value: function getSecondsLoaded() { return this.secondsLoaded; } }, { key: "render", value: function render() { var display = this.props.display; var style = { width: '100%', height: '100%', overflow: 'hidden', display: display }; return _react["default"].createElement("div", { key: this.props.url, ref: this.ref, style: style }); } }]); return Vimeo; }(_react.Component); exports.Vimeo = Vimeo; _defineProperty(Vimeo, "displayName", 'Vimeo'); _defineProperty(Vimeo, "forceLoad", true); _defineProperty(Vimeo, "canPlay", function (url) { if (MATCH_FILE_URL.test(url)) { return false; } return MATCH_URL.test(url); }); var _default = (0, _singlePlayer["default"])(Vimeo); exports["default"] = _default; /***/ }), /* 169 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = exports.DailyMotion = void 0; var _react = _interopRequireWildcard(__webpack_require__(0)); var _utils = __webpack_require__(33); var _singlePlayer = _interopRequireDefault(__webpack_require__(42)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } var SDK_URL = 'https://api.dmcdn.net/all.js'; var SDK_GLOBAL = 'DM'; var SDK_GLOBAL_READY = 'dmAsyncInit'; var MATCH_URL = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?$/; var DailyMotion = /*#__PURE__*/ function (_Component) { _inherits(DailyMotion, _Component); function DailyMotion() { var _getPrototypeOf2; var _this; _classCallCheck(this, DailyMotion); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(DailyMotion)).call.apply(_getPrototypeOf2, [this].concat(args))); _defineProperty(_assertThisInitialized(_this), "callPlayer", _utils.callPlayer); _defineProperty(_assertThisInitialized(_this), "onDurationChange", function () { var duration = _this.getDuration(); _this.props.onDuration(duration); }); _defineProperty(_assertThisInitialized(_this), "mute", function () { _this.callPlayer('setMuted', true); }); _defineProperty(_assertThisInitialized(_this), "unmute", function () { _this.callPlayer('setMuted', false); }); _defineProperty(_assertThisInitialized(_this), "ref", function (container) { _this.container = container; }); return _this; } _createClass(DailyMotion, [{ key: "load", value: function load(url) { var _this2 = this; var _this$props = this.props, controls = _this$props.controls, config = _this$props.config, onError = _this$props.onError, playing = _this$props.playing; var _url$match = url.match(MATCH_URL), _url$match2 = _slicedToArray(_url$match, 2), id = _url$match2[1]; if (this.player) { this.player.load(id, { start: (0, _utils.parseStartTime)(url), autoplay: playing }); return; } (0, _utils.getSDK)(SDK_URL, SDK_GLOBAL, SDK_GLOBAL_READY, function (DM) { return DM.player; }).then(function (DM) { if (!_this2.container) return; var Player = DM.player; _this2.player = new Player(_this2.container, { width: '100%', height: '100%', video: id, params: _objectSpread({ controls: controls, autoplay: _this2.props.playing, mute: _this2.props.muted, start: (0, _utils.parseStartTime)(url), origin: window.location.origin }, config.dailymotion.params), events: { apiready: _this2.props.onReady, seeked: function seeked() { return _this2.props.onSeek(_this2.player.currentTime); }, video_end: _this2.props.onEnded, durationchange: _this2.onDurationChange, pause: _this2.props.onPause, playing: _this2.props.onPlay, waiting: _this2.props.onBuffer, error: function error(event) { return onError(event); } } }); }, onError); } }, { key: "play", value: function play() { this.callPlayer('play'); } }, { key: "pause", value: function pause() { this.callPlayer('pause'); } }, { key: "stop", value: function stop() {// Nothing to do } }, { key: "seekTo", value: function seekTo(seconds) { this.callPlayer('seek', seconds); } }, { key: "setVolume", value: function setVolume(fraction) { this.callPlayer('setVolume', fraction); } }, { key: "getDuration", value: function getDuration() { return this.player.duration || null; } }, { key: "getCurrentTime", value: function getCurrentTime() { return this.player.currentTime; } }, { key: "getSecondsLoaded", value: function getSecondsLoaded() { return this.player.bufferedTime; } }, { key: "render", value: function render() { var display = this.props.display; var style = { width: '100%', height: '100%', display: display }; return _react["default"].createElement("div", { style: style }, _react["default"].createElement("div", { ref: this.ref })); } }]); return DailyMotion; }(_react.Component); exports.DailyMotion = DailyMotion; _defineProperty(DailyMotion, "displayName", 'DailyMotion'); _defineProperty(DailyMotion, "canPlay", function (url) { return MATCH_URL.test(url); }); _defineProperty(DailyMotion, "loopOnEnded", true); var _default = (0, _singlePlayer["default"])(DailyMotion); exports["default"] = _default; /***/ }), /* 170 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (immutable) */ __webpack_exports__["a"] = warning; /** * Prints a warning in the console if it exists. * * @param {String} message The warning message. * @returns {void} */ function warning(message) { /* eslint-disable no-console */ if (typeof console !== 'undefined' && typeof console.error === 'function') { console.error(message); } /* eslint-enable no-console */ try { // This error was thrown as a convenience so that if you enable // "break on all exceptions" in your console, // it would pause the execution at this line. throw new Error(message); /* eslint-disable no-empty */ } catch (e) {} /* eslint-enable no-empty */ } /***/ }), /* 171 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; exports.replaceUrlQuery = replaceUrlQuery; exports.pushUrlQuery = pushUrlQuery; exports.replaceInUrlQuery = replaceInUrlQuery; exports.pushInUrlQuery = pushInUrlQuery; exports.multiReplaceInUrlQuery = multiReplaceInUrlQuery; exports.multiPushInUrlQuery = multiPushInUrlQuery; exports.updateUrlQuerySingle = updateUrlQuerySingle; exports.updateUrlQueryMulti = updateUrlQueryMulti; var _queryString = __webpack_require__(204); var _urlQueryConfig = __webpack_require__(86); var _urlQueryConfig2 = _interopRequireDefault(_urlQueryConfig); var _UrlUpdateTypes = __webpack_require__(87); var _UrlUpdateTypes2 = _interopRequireDefault(_UrlUpdateTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function getLocation(location) { if (location) { return location; } // if no location provided, check history var history = _urlQueryConfig2.default.history; // if not in history, use window return history.location ? history.location : window.location; } function mergeLocationQueryOrSearch(location, newQuery) { // if location.query exists, update the query in location. otherwise update the search string // replace location.query if (location.query) { return _extends({}, location, { query: newQuery, search: undefined }); } // replace location.search var queryStr = (0, _queryString.stringify)(newQuery); return _extends({}, location, { search: queryStr.length ? '?' + queryStr : undefined }); } function updateLocation(newQuery, location) { location = getLocation(location); // remove query params that are nully or an empty strings. // note: these values are assumed to be already encoded as strings. var filteredQuery = Object.keys(newQuery).reduce(function (queryAccumulator, queryParam) { var encodedValue = newQuery[queryParam]; if (encodedValue != null && encodedValue !== '') { queryAccumulator[queryParam] = encodedValue; } return queryAccumulator; }, {}); var newLocation = mergeLocationQueryOrSearch(location, filteredQuery); // remove the key from the location delete newLocation.key; return newLocation; } function updateInLocation(queryParam, encodedValue, location) { location = getLocation(location); // if a query is there, use it, otherwise parse the search string var currQuery = location.query || (0, _queryString.parse)(location.search); var newQuery = _extends({}, currQuery, _defineProperty({}, queryParam, encodedValue)); // remove if it is nully or an empty string when encoded if (encodedValue == null || encodedValue === '') { delete newQuery[queryParam]; } var newLocation = mergeLocationQueryOrSearch(location, newQuery); // remove the key from the location delete newLocation.key; return newLocation; } /** * Update multiple parts of the location at once */ function multiUpdateInLocation(queryReplacements, location) { location = getLocation(location); // if a query is there, use it, otherwise parse the search string var currQuery = location.query || (0, _queryString.parse)(location.search); var newQuery = _extends({}, currQuery, queryReplacements); // remove if it is nully or an empty string when encoded Object.keys(queryReplacements).forEach(function (queryParam) { var encodedValue = queryReplacements[queryParam]; if (encodedValue == null || encodedValue === '') { delete newQuery[queryParam]; } }); var newLocation = mergeLocationQueryOrSearch(location, newQuery); // remove the key from the location delete newLocation.key; return newLocation; } function replaceUrlQuery(newQuery, location) { var newLocation = updateLocation(newQuery, location); return _urlQueryConfig2.default.history.replace(newLocation); } function pushUrlQuery(newQuery, location) { var newLocation = updateLocation(newQuery, location); return _urlQueryConfig2.default.history.push(newLocation); } function replaceInUrlQuery(queryParam, encodedValue, location) { var newLocation = updateInLocation(queryParam, encodedValue, location); return _urlQueryConfig2.default.history.replace(newLocation); } function pushInUrlQuery(queryParam, encodedValue, location) { var newLocation = updateInLocation(queryParam, encodedValue, location); return _urlQueryConfig2.default.history.push(newLocation); } /** * Replace multiple query parameters in a URL at once with only one * call to `history.replace` * * @param {Object} queryReplacements Object representing the params and * their encoded values. { queryParam: encodedValue, ... } */ function multiReplaceInUrlQuery(queryReplacements, location) { var newLocation = multiUpdateInLocation(queryReplacements, location); return _urlQueryConfig2.default.history.replace(newLocation); } function multiPushInUrlQuery(queryReplacements, location) { var newLocation = multiUpdateInLocation(queryReplacements, location); return _urlQueryConfig2.default.history.push(newLocation); } /** * Updates a single value in a query based on the type */ function updateUrlQuerySingle() { var updateType = arguments.length <= 0 || arguments[0] === undefined ? _UrlUpdateTypes2.default.replaceIn : arguments[0]; var queryParam = arguments[1]; var encodedValue = arguments[2]; var location = arguments[3]; if (updateType === _UrlUpdateTypes2.default.replaceIn) { return replaceInUrlQuery(queryParam, encodedValue, location); } if (updateType === _UrlUpdateTypes2.default.pushIn) { return pushInUrlQuery(queryParam, encodedValue, location); } // for these, wrap it in a whole new query object var newQuery = _defineProperty({}, queryParam, encodedValue); if (updateType === _UrlUpdateTypes2.default.replace) { return replaceUrlQuery(newQuery, location); } if (updateType === _UrlUpdateTypes2.default.push) { return pushUrlQuery(newQuery, location); } return undefined; } /** * Updates a multiple values in a query based on the type */ function updateUrlQueryMulti() { var updateType = arguments.length <= 0 || arguments[0] === undefined ? _UrlUpdateTypes2.default.replaceIn : arguments[0]; var queryReplacements = arguments[1]; var location = arguments[2]; if (updateType === _UrlUpdateTypes2.default.replaceIn) { return multiReplaceInUrlQuery(queryReplacements, location); } if (updateType === _UrlUpdateTypes2.default.pushIn) { return multiPushInUrlQuery(queryReplacements, location); } if (updateType === _UrlUpdateTypes2.default.replace) { return replaceUrlQuery(queryReplacements, location); } if (updateType === _UrlUpdateTypes2.default.push) { return pushUrlQuery(queryReplacements, location); } return undefined; } /***/ }), /* 172 */ /***/ (function(module, exports, __webpack_require__) { var freeGlobal = __webpack_require__(343); /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; /***/ }), /* 173 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var React = _interopRequireWildcard(__webpack_require__(0)); var _reactLifecyclesCompat = __webpack_require__(7); var _rcTooltip = _interopRequireDefault(__webpack_require__(704)); var _classnames = _interopRequireDefault(__webpack_require__(3)); var _placements = _interopRequireDefault(__webpack_require__(723)); var _configProvider = __webpack_require__(14); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } var splitObject = function splitObject(obj, keys) { var picked = {}; var omitted = _extends({}, obj); keys.forEach(function (key) { if (obj && key in obj) { picked[key] = obj[key]; delete omitted[key]; } }); return { picked: picked, omitted: omitted }; }; // Fix Tooltip won't hide at disabled button // mouse events don't trigger at disabled button in Chrome // https://github.com/react-component/tooltip/issues/18 function getDisabledCompatibleChildren(element) { var elementType = element.type; if ((elementType.__ANT_BUTTON === true || elementType.__ANT_SWITCH === true || elementType.__ANT_CHECKBOX === true || element.type === 'button') && element.props.disabled) { // Pick some layout related style properties up to span // Prevent layout bugs like https://github.com/ant-design/ant-design/issues/5254 var _splitObject = splitObject(element.props.style, ['position', 'left', 'right', 'top', 'bottom', 'float', 'display', 'zIndex']), picked = _splitObject.picked, omitted = _splitObject.omitted; var spanStyle = _extends(_extends({ display: 'inline-block' }, picked), { cursor: 'not-allowed', width: element.props.block ? '100%' : null }); var buttonStyle = _extends(_extends({}, omitted), { pointerEvents: 'none' }); var child = React.cloneElement(element, { style: buttonStyle, className: null }); return React.createElement("span", { style: spanStyle, className: element.props.className }, child); } return element; } var Tooltip = /*#__PURE__*/ function (_React$Component) { _inherits(Tooltip, _React$Component); function Tooltip(props) { var _this; _classCallCheck(this, Tooltip); _this = _possibleConstructorReturn(this, _getPrototypeOf(Tooltip).call(this, props)); _this.onVisibleChange = function (visible) { var onVisibleChange = _this.props.onVisibleChange; if (!('visible' in _this.props)) { _this.setState({ visible: _this.isNoTitle() ? false : visible }); } if (onVisibleChange && !_this.isNoTitle()) { onVisibleChange(visible); } }; _this.saveTooltip = function (node) { _this.tooltip = node; }; // 动态设置动画点 _this.onPopupAlign = function (domNode, align) { var placements = _this.getPlacements(); // 当前返回的位置 var placement = Object.keys(placements).filter(function (key) { return placements[key].points[0] === align.points[0] && placements[key].points[1] === align.points[1]; })[0]; if (!placement) { return; } // 根据当前坐标设置动画点 var rect = domNode.getBoundingClientRect(); var transformOrigin = { top: '50%', left: '50%' }; if (placement.indexOf('top') >= 0 || placement.indexOf('Bottom') >= 0) { transformOrigin.top = "".concat(rect.height - align.offset[1], "px"); } else if (placement.indexOf('Top') >= 0 || placement.indexOf('bottom') >= 0) { transformOrigin.top = "".concat(-align.offset[1], "px"); } if (placement.indexOf('left') >= 0 || placement.indexOf('Right') >= 0) { transformOrigin.left = "".concat(rect.width - align.offset[0], "px"); } else if (placement.indexOf('right') >= 0 || placement.indexOf('Left') >= 0) { transformOrigin.left = "".concat(-align.offset[0], "px"); } domNode.style.transformOrigin = "".concat(transformOrigin.left, " ").concat(transformOrigin.top); }; _this.renderTooltip = function (_ref) { var getContextPopupContainer = _ref.getPopupContainer, getPrefixCls = _ref.getPrefixCls; var _assertThisInitialize = _assertThisInitialized(_this), props = _assertThisInitialize.props, state = _assertThisInitialize.state; var customizePrefixCls = props.prefixCls, openClassName = props.openClassName, getPopupContainer = props.getPopupContainer, getTooltipContainer = props.getTooltipContainer; var children = props.children; var prefixCls = getPrefixCls('tooltip', customizePrefixCls); var visible = state.visible; // Hide tooltip when there is no title if (!('visible' in props) && _this.isNoTitle()) { visible = false; } var child = getDisabledCompatibleChildren(React.isValidElement(children) ? children : React.createElement("span", null, children)); var childProps = child.props; var childCls = (0, _classnames["default"])(childProps.className, _defineProperty({}, openClassName || "".concat(prefixCls, "-open"), true)); return React.createElement(_rcTooltip["default"], _extends({}, _this.props, { prefixCls: prefixCls, getTooltipContainer: getPopupContainer || getTooltipContainer || getContextPopupContainer, ref: _this.saveTooltip, builtinPlacements: _this.getPlacements(), overlay: _this.getOverlay(), visible: visible, onVisibleChange: _this.onVisibleChange, onPopupAlign: _this.onPopupAlign }), visible ? React.cloneElement(child, { className: childCls }) : child); }; _this.state = { visible: !!props.visible || !!props.defaultVisible }; return _this; } _createClass(Tooltip, [{ key: "getPopupDomNode", value: function getPopupDomNode() { return this.tooltip.getPopupDomNode(); } }, { key: "getPlacements", value: function getPlacements() { var _this$props = this.props, builtinPlacements = _this$props.builtinPlacements, arrowPointAtCenter = _this$props.arrowPointAtCenter, autoAdjustOverflow = _this$props.autoAdjustOverflow; return builtinPlacements || (0, _placements["default"])({ arrowPointAtCenter: arrowPointAtCenter, verticalArrowShift: 8, autoAdjustOverflow: autoAdjustOverflow }); } }, { key: "isNoTitle", value: function isNoTitle() { var _this$props2 = this.props, title = _this$props2.title, overlay = _this$props2.overlay; return !title && !overlay && title !== 0; // overlay for old version compatibility } }, { key: "getOverlay", value: function getOverlay() { var _this$props3 = this.props, title = _this$props3.title, overlay = _this$props3.overlay; if (title === 0) { return title; } return overlay || title || ''; } }, { key: "render", value: function render() { return React.createElement(_configProvider.ConfigConsumer, null, this.renderTooltip); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps) { if ('visible' in nextProps) { return { visible: nextProps.visible }; } return null; } }]); return Tooltip; }(React.Component); Tooltip.defaultProps = { placement: 'top', transitionName: 'zoom-big-fast', mouseEnterDelay: 0.1, mouseLeaveDelay: 0.1, arrowPointAtCenter: false, autoAdjustOverflow: true }; (0, _reactLifecyclesCompat.polyfill)(Tooltip); var _default = Tooltip; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 174 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(31); __webpack_require__(703); //# sourceMappingURL=css.js.map /***/ }), /* 175 */ /***/ (function(module, exports) { /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; /***/ }), /* 176 */ /***/ (function(module, exports) { /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; /***/ }), /* 177 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Menu__ = __webpack_require__(747); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__SubMenu__ = __webpack_require__(295); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MenuItem__ = __webpack_require__(761); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MenuItemGroup__ = __webpack_require__(764); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Divider__ = __webpack_require__(765); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "SubMenu", function() { return __WEBPACK_IMPORTED_MODULE_1__SubMenu__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Item", function() { return __WEBPACK_IMPORTED_MODULE_2__MenuItem__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MenuItem", function() { return __WEBPACK_IMPORTED_MODULE_2__MenuItem__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MenuItemGroup", function() { return __WEBPACK_IMPORTED_MODULE_3__MenuItemGroup__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ItemGroup", function() { return __WEBPACK_IMPORTED_MODULE_3__MenuItemGroup__["a"]; }); /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Divider", function() { return __WEBPACK_IMPORTED_MODULE_4__Divider__["a"]; }); /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__Menu__["a" /* default */]); /***/ }), /* 178 */ /***/ (function(module, exports, __webpack_require__) { var freeGlobal = __webpack_require__(346); /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; /***/ }), /* 179 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "Group", { enumerable: true, get: function get() { return _group["default"]; } }); Object.defineProperty(exports, "Button", { enumerable: true, get: function get() { return _radioButton["default"]; } }); exports["default"] = void 0; var _radio = _interopRequireDefault(__webpack_require__(163)); var _group = _interopRequireDefault(__webpack_require__(740)); var _radioButton = _interopRequireDefault(__webpack_require__(741)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } _radio["default"].Button = _radioButton["default"]; _radio["default"].Group = _group["default"]; var _default = _radio["default"]; exports["default"] = _default; //# sourceMappingURL=index.js.map /***/ }), /* 180 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css__ = __webpack_require__(28); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_modal_style_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_modal__ = __webpack_require__(29); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_modal___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_modal__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_spin_style_css__ = __webpack_require__(75); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_spin_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_spin_style_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_spin__ = __webpack_require__(76); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_spin___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_spin__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_icon_style_css__ = __webpack_require__(182); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_icon_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_antd_lib_icon_style_css__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_icon__ = __webpack_require__(27); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_icon___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_antd_lib_icon__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_educoder__ = __webpack_require__(5); var _createClass=function(){function defineProperties(target,props){for(var i=0;i