框架源码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2085 lines
55 KiB

4 years ago
  1. module.exports =
  2. /******/ (function(modules) { // webpackBootstrap
  3. /******/ // The module cache
  4. /******/ var installedModules = {};
  5. /******/
  6. /******/ // The require function
  7. /******/ function __webpack_require__(moduleId) {
  8. /******/
  9. /******/ // Check if module is in cache
  10. /******/ if(installedModules[moduleId]) {
  11. /******/ return installedModules[moduleId].exports;
  12. /******/ }
  13. /******/ // Create a new module (and put it into the cache)
  14. /******/ var module = installedModules[moduleId] = {
  15. /******/ i: moduleId,
  16. /******/ l: false,
  17. /******/ exports: {}
  18. /******/ };
  19. /******/
  20. /******/ // Execute the module function
  21. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22. /******/
  23. /******/ // Flag the module as loaded
  24. /******/ module.l = true;
  25. /******/
  26. /******/ // Return the exports of the module
  27. /******/ return module.exports;
  28. /******/ }
  29. /******/
  30. /******/
  31. /******/ // expose the modules object (__webpack_modules__)
  32. /******/ __webpack_require__.m = modules;
  33. /******/
  34. /******/ // expose the module cache
  35. /******/ __webpack_require__.c = installedModules;
  36. /******/
  37. /******/ // define getter function for harmony exports
  38. /******/ __webpack_require__.d = function(exports, name, getter) {
  39. /******/ if(!__webpack_require__.o(exports, name)) {
  40. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  41. /******/ }
  42. /******/ };
  43. /******/
  44. /******/ // define __esModule on exports
  45. /******/ __webpack_require__.r = function(exports) {
  46. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  47. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  48. /******/ }
  49. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  50. /******/ };
  51. /******/
  52. /******/ // create a fake namespace object
  53. /******/ // mode & 1: value is a module id, require it
  54. /******/ // mode & 2: merge all properties of value into the ns
  55. /******/ // mode & 4: return value when already ns object
  56. /******/ // mode & 8|1: behave like require
  57. /******/ __webpack_require__.t = function(value, mode) {
  58. /******/ if(mode & 1) value = __webpack_require__(value);
  59. /******/ if(mode & 8) return value;
  60. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  61. /******/ var ns = Object.create(null);
  62. /******/ __webpack_require__.r(ns);
  63. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  64. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  65. /******/ return ns;
  66. /******/ };
  67. /******/
  68. /******/ // getDefaultExport function for compatibility with non-harmony modules
  69. /******/ __webpack_require__.n = function(module) {
  70. /******/ var getter = module && module.__esModule ?
  71. /******/ function getDefault() { return module['default']; } :
  72. /******/ function getModuleExports() { return module; };
  73. /******/ __webpack_require__.d(getter, 'a', getter);
  74. /******/ return getter;
  75. /******/ };
  76. /******/
  77. /******/ // Object.prototype.hasOwnProperty.call
  78. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79. /******/
  80. /******/ // __webpack_public_path__
  81. /******/ __webpack_require__.p = "/dist/";
  82. /******/
  83. /******/
  84. /******/ // Load entry module and return exports
  85. /******/ return __webpack_require__(__webpack_require__.s = 353);
  86. /******/ })
  87. /************************************************************************/
  88. /******/ ({
  89. /***/ 0:
  90. /***/ (function(module, exports, __webpack_require__) {
  91. "use strict";
  92. var _interopRequireDefault = __webpack_require__(1);
  93. exports.__esModule = true;
  94. exports.noop = noop;
  95. exports.isDef = isDef;
  96. exports.isFunction = isFunction;
  97. exports.isObject = isObject;
  98. exports.isPromise = isPromise;
  99. exports.get = get;
  100. exports.isServer = exports.inBrowser = exports.addUnit = exports.createNamespace = void 0;
  101. var _vue = _interopRequireDefault(__webpack_require__(4));
  102. var _create = __webpack_require__(24);
  103. exports.createNamespace = _create.createNamespace;
  104. var _unit = __webpack_require__(20);
  105. exports.addUnit = _unit.addUnit;
  106. var inBrowser = typeof window !== 'undefined';
  107. exports.inBrowser = inBrowser;
  108. var isServer = _vue.default.prototype.$isServer; // eslint-disable-next-line @typescript-eslint/no-empty-function
  109. exports.isServer = isServer;
  110. function noop() {}
  111. function isDef(val) {
  112. return val !== undefined && val !== null;
  113. }
  114. function isFunction(val) {
  115. return typeof val === 'function';
  116. }
  117. function isObject(val) {
  118. return val !== null && typeof val === 'object';
  119. }
  120. function isPromise(val) {
  121. return isObject(val) && isFunction(val.then) && isFunction(val.catch);
  122. }
  123. function get(object, path) {
  124. var keys = path.split('.');
  125. var result = object;
  126. keys.forEach(function (key) {
  127. var _result$key;
  128. result = (_result$key = result[key]) != null ? _result$key : '';
  129. });
  130. return result;
  131. }
  132. /***/ }),
  133. /***/ 1:
  134. /***/ (function(module, exports) {
  135. function _interopRequireDefault(obj) {
  136. return obj && obj.__esModule ? obj : {
  137. "default": obj
  138. };
  139. }
  140. module.exports = _interopRequireDefault;
  141. /***/ }),
  142. /***/ 11:
  143. /***/ (function(module, exports, __webpack_require__) {
  144. "use strict";
  145. var _interopRequireDefault = __webpack_require__(1);
  146. exports.__esModule = true;
  147. exports.default = void 0;
  148. var _vue = _interopRequireDefault(__webpack_require__(4));
  149. var _deepAssign = __webpack_require__(21);
  150. var _zhCN = _interopRequireDefault(__webpack_require__(27));
  151. var proto = _vue.default.prototype;
  152. var defineReactive = _vue.default.util.defineReactive;
  153. defineReactive(proto, '$vantLang', 'zh-CN');
  154. defineReactive(proto, '$vantMessages', {
  155. 'zh-CN': _zhCN.default
  156. });
  157. var _default = {
  158. messages: function messages() {
  159. return proto.$vantMessages[proto.$vantLang];
  160. },
  161. use: function use(lang, messages) {
  162. var _this$add;
  163. proto.$vantLang = lang;
  164. this.add((_this$add = {}, _this$add[lang] = messages, _this$add));
  165. },
  166. add: function add(messages) {
  167. if (messages === void 0) {
  168. messages = {};
  169. }
  170. (0, _deepAssign.deepAssign)(proto.$vantMessages, messages);
  171. }
  172. };
  173. exports.default = _default;
  174. /***/ }),
  175. /***/ 12:
  176. /***/ (function(module, exports) {
  177. /**
  178. * When source maps are enabled, `style-loader` uses a link element with a data-uri to
  179. * embed the css on the page. This breaks all relative urls because now they are relative to a
  180. * bundle instead of the current page.
  181. *
  182. * One solution is to only use full urls, but that may be impossible.
  183. *
  184. * Instead, this function "fixes" the relative urls to be absolute according to the current page location.
  185. *
  186. * A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
  187. *
  188. */
  189. module.exports = function (css) {
  190. // get current location
  191. var location = typeof window !== "undefined" && window.location;
  192. if (!location) {
  193. throw new Error("fixUrls requires window.location");
  194. }
  195. // blank or null?
  196. if (!css || typeof css !== "string") {
  197. return css;
  198. }
  199. var baseUrl = location.protocol + "//" + location.host;
  200. var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");
  201. // convert each url(...)
  202. /*
  203. This regular expression is just a way to recursively match brackets within
  204. a string.
  205. /url\s*\( = Match on the word "url" with any whitespace after it and then a parens
  206. ( = Start a capturing group
  207. (?: = Start a non-capturing group
  208. [^)(] = Match anything that isn't a parentheses
  209. | = OR
  210. \( = Match a start parentheses
  211. (?: = Start another non-capturing groups
  212. [^)(]+ = Match anything that isn't a parentheses
  213. | = OR
  214. \( = Match a start parentheses
  215. [^)(]* = Match anything that isn't a parentheses
  216. \) = Match a end parentheses
  217. ) = End Group
  218. *\) = Match anything and then a close parens
  219. ) = Close non-capturing group
  220. * = Match anything
  221. ) = Close capturing group
  222. \) = Match a close parens
  223. /gi = Get all matches, not the first. Be case insensitive.
  224. */
  225. var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
  226. // strip quotes (if they exist)
  227. var unquotedOrigUrl = origUrl
  228. .trim()
  229. .replace(/^"(.*)"$/, function(o, $1){ return $1; })
  230. .replace(/^'(.*)'$/, function(o, $1){ return $1; });
  231. // already a full url? no change
  232. if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(unquotedOrigUrl)) {
  233. return fullMatch;
  234. }
  235. // convert the url to a full url
  236. var newUrl;
  237. if (unquotedOrigUrl.indexOf("//") === 0) {
  238. //TODO: should we add protocol?
  239. newUrl = unquotedOrigUrl;
  240. } else if (unquotedOrigUrl.indexOf("/") === 0) {
  241. // path should be relative to the base url
  242. newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
  243. } else {
  244. // path should be relative to current directory
  245. newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
  246. }
  247. // send back the fixed url(...)
  248. return "url(" + JSON.stringify(newUrl) + ")";
  249. });
  250. // send back the fixed css
  251. return fixedCss;
  252. };
  253. /***/ }),
  254. /***/ 19:
  255. /***/ (function(module, exports, __webpack_require__) {
  256. "use strict";
  257. exports.__esModule = true;
  258. exports.isNumeric = isNumeric;
  259. exports.isNaN = isNaN;
  260. function isNumeric(val) {
  261. return /^\d+(\.\d+)?$/.test(val);
  262. }
  263. function isNaN(val) {
  264. if (Number.isNaN) {
  265. return Number.isNaN(val);
  266. } // eslint-disable-next-line no-self-compare
  267. return val !== val;
  268. }
  269. /***/ }),
  270. /***/ 20:
  271. /***/ (function(module, exports, __webpack_require__) {
  272. "use strict";
  273. exports.__esModule = true;
  274. exports.addUnit = addUnit;
  275. exports.unitToPx = unitToPx;
  276. var _ = __webpack_require__(0);
  277. var _number = __webpack_require__(19);
  278. function addUnit(value) {
  279. if (!(0, _.isDef)(value)) {
  280. return undefined;
  281. }
  282. value = String(value);
  283. return (0, _number.isNumeric)(value) ? value + "px" : value;
  284. } // cache
  285. var rootFontSize;
  286. function getRootFontSize() {
  287. if (!rootFontSize) {
  288. var doc = document.documentElement;
  289. var fontSize = doc.style.fontSize || window.getComputedStyle(doc).fontSize;
  290. rootFontSize = parseFloat(fontSize);
  291. }
  292. return rootFontSize;
  293. }
  294. function convertRem(value) {
  295. value = value.replace(/rem/g, '');
  296. return +value * getRootFontSize();
  297. }
  298. function convertVw(value) {
  299. value = value.replace(/vw/g, '');
  300. return +value * window.innerWidth / 100;
  301. }
  302. function convertVh(value) {
  303. value = value.replace(/vh/g, '');
  304. return +value * window.innerHeight / 100;
  305. }
  306. function unitToPx(value) {
  307. if (typeof value === 'number') {
  308. return value;
  309. }
  310. if (_.inBrowser) {
  311. if (value.indexOf('rem') !== -1) {
  312. return convertRem(value);
  313. }
  314. if (value.indexOf('vw') !== -1) {
  315. return convertVw(value);
  316. }
  317. if (value.indexOf('vh') !== -1) {
  318. return convertVh(value);
  319. }
  320. }
  321. return parseFloat(value);
  322. }
  323. /***/ }),
  324. /***/ 209:
  325. /***/ (function(module, exports, __webpack_require__) {
  326. "use strict";
  327. exports.__esModule = true;
  328. exports.default = void 0;
  329. var _utils = __webpack_require__(0);
  330. var _style = __webpack_require__(94);
  331. var _event = __webpack_require__(30);
  332. var _scroll = __webpack_require__(53);
  333. var _touch = __webpack_require__(51);
  334. var _relation = __webpack_require__(47);
  335. var _bindEvent = __webpack_require__(60);
  336. // Utils
  337. // Mixins
  338. function genAlphabet() {
  339. var indexList = [];
  340. var charCodeOfA = 'A'.charCodeAt(0);
  341. for (var i = 0; i < 26; i++) {
  342. indexList.push(String.fromCharCode(charCodeOfA + i));
  343. }
  344. return indexList;
  345. }
  346. var _createNamespace = (0, _utils.createNamespace)('index-bar'),
  347. createComponent = _createNamespace[0],
  348. bem = _createNamespace[1];
  349. var _default = createComponent({
  350. mixins: [_touch.TouchMixin, (0, _relation.ParentMixin)('vanIndexBar'), (0, _bindEvent.BindEventMixin)(function (bind) {
  351. if (!this.scroller) {
  352. this.scroller = (0, _scroll.getScroller)(this.$el);
  353. }
  354. bind(this.scroller, 'scroll', this.onScroll);
  355. })],
  356. props: {
  357. zIndex: [Number, String],
  358. highlightColor: String,
  359. sticky: {
  360. type: Boolean,
  361. default: true
  362. },
  363. stickyOffsetTop: {
  364. type: Number,
  365. default: 0
  366. },
  367. indexList: {
  368. type: Array,
  369. default: genAlphabet
  370. }
  371. },
  372. data: function data() {
  373. return {
  374. activeAnchorIndex: null
  375. };
  376. },
  377. computed: {
  378. sidebarStyle: function sidebarStyle() {
  379. if ((0, _utils.isDef)(this.zIndex)) {
  380. return {
  381. zIndex: this.zIndex + 1
  382. };
  383. }
  384. },
  385. highlightStyle: function highlightStyle() {
  386. var highlightColor = this.highlightColor;
  387. if (highlightColor) {
  388. return {
  389. color: highlightColor
  390. };
  391. }
  392. }
  393. },
  394. watch: {
  395. indexList: function indexList() {
  396. this.$nextTick(this.onScroll);
  397. },
  398. activeAnchorIndex: function activeAnchorIndex(value) {
  399. if (value) {
  400. this.$emit('change', value);
  401. }
  402. }
  403. },
  404. methods: {
  405. onScroll: function onScroll() {
  406. var _this = this;
  407. if ((0, _style.isHidden)(this.$el)) {
  408. return;
  409. }
  410. var scrollTop = (0, _scroll.getScrollTop)(this.scroller);
  411. var scrollerRect = this.getScrollerRect();
  412. var rects = this.children.map(function (item) {
  413. return item.getRect(_this.scroller, scrollerRect);
  414. });
  415. var active = this.getActiveAnchorIndex(scrollTop, rects);
  416. this.activeAnchorIndex = this.indexList[active];
  417. if (this.sticky) {
  418. this.children.forEach(function (item, index) {
  419. if (index === active || index === active - 1) {
  420. var rect = item.$el.getBoundingClientRect();
  421. item.left = rect.left;
  422. item.width = rect.width;
  423. } else {
  424. item.left = null;
  425. item.width = null;
  426. }
  427. if (index === active) {
  428. item.active = true;
  429. item.top = Math.max(_this.stickyOffsetTop, rects[index].top - scrollTop) + scrollerRect.top;
  430. } else if (index === active - 1) {
  431. var activeItemTop = rects[active].top - scrollTop;
  432. item.active = activeItemTop > 0;
  433. item.top = activeItemTop + scrollerRect.top - rects[index].height;
  434. } else {
  435. item.active = false;
  436. }
  437. });
  438. }
  439. },
  440. getScrollerRect: function getScrollerRect() {
  441. if (this.scroller.getBoundingClientRect) {
  442. return this.scroller.getBoundingClientRect();
  443. }
  444. return {
  445. top: 0,
  446. left: 0
  447. };
  448. },
  449. getActiveAnchorIndex: function getActiveAnchorIndex(scrollTop, rects) {
  450. for (var i = this.children.length - 1; i >= 0; i--) {
  451. var prevHeight = i > 0 ? rects[i - 1].height : 0;
  452. var reachTop = this.sticky ? prevHeight + this.stickyOffsetTop : 0;
  453. if (scrollTop + reachTop >= rects[i].top) {
  454. return i;
  455. }
  456. }
  457. return -1;
  458. },
  459. onClick: function onClick(event) {
  460. this.scrollToElement(event.target);
  461. },
  462. onTouchMove: function onTouchMove(event) {
  463. this.touchMove(event);
  464. if (this.direction === 'vertical') {
  465. (0, _event.preventDefault)(event);
  466. var _event$touches$ = event.touches[0],
  467. clientX = _event$touches$.clientX,
  468. clientY = _event$touches$.clientY;
  469. var target = document.elementFromPoint(clientX, clientY);
  470. if (target) {
  471. var index = target.dataset.index;
  472. /* istanbul ignore else */
  473. if (this.touchActiveIndex !== index) {
  474. this.touchActiveIndex = index;
  475. this.scrollToElement(target);
  476. }
  477. }
  478. }
  479. },
  480. scrollTo: function scrollTo(index) {
  481. var match = this.children.filter(function (item) {
  482. return String(item.index) === index;
  483. });
  484. if (match[0]) {
  485. match[0].scrollIntoView();
  486. if (this.sticky && this.stickyOffsetTop) {
  487. (0, _scroll.setRootScrollTop)((0, _scroll.getRootScrollTop)() - this.stickyOffsetTop);
  488. }
  489. this.$emit('select', match[0].index);
  490. }
  491. },
  492. scrollToElement: function scrollToElement(element) {
  493. var index = element.dataset.index;
  494. this.scrollTo(index);
  495. },
  496. onTouchEnd: function onTouchEnd() {
  497. this.active = null;
  498. }
  499. },
  500. render: function render() {
  501. var _this2 = this;
  502. var h = arguments[0];
  503. var Indexes = this.indexList.map(function (index) {
  504. var active = index === _this2.activeAnchorIndex;
  505. return h("span", {
  506. "class": bem('index', {
  507. active: active
  508. }),
  509. "style": active ? _this2.highlightStyle : null,
  510. "attrs": {
  511. "data-index": index
  512. }
  513. }, [index]);
  514. });
  515. return h("div", {
  516. "class": bem()
  517. }, [h("div", {
  518. "class": bem('sidebar'),
  519. "style": this.sidebarStyle,
  520. "on": {
  521. "click": this.onClick,
  522. "touchstart": this.touchStart,
  523. "touchmove": this.onTouchMove,
  524. "touchend": this.onTouchEnd,
  525. "touchcancel": this.onTouchEnd
  526. }
  527. }, [Indexes]), this.slots('default')]);
  528. }
  529. });
  530. exports.default = _default;
  531. /***/ }),
  532. /***/ 21:
  533. /***/ (function(module, exports, __webpack_require__) {
  534. "use strict";
  535. exports.__esModule = true;
  536. exports.deepAssign = deepAssign;
  537. var _ = __webpack_require__(0);
  538. var hasOwnProperty = Object.prototype.hasOwnProperty;
  539. function assignKey(to, from, key) {
  540. var val = from[key];
  541. if (!(0, _.isDef)(val)) {
  542. return;
  543. }
  544. if (!hasOwnProperty.call(to, key) || !(0, _.isObject)(val)) {
  545. to[key] = val;
  546. } else {
  547. // eslint-disable-next-line @typescript-eslint/no-use-before-define
  548. to[key] = deepAssign(Object(to[key]), from[key]);
  549. }
  550. }
  551. function deepAssign(to, from) {
  552. Object.keys(from).forEach(function (key) {
  553. assignKey(to, from, key);
  554. });
  555. return to;
  556. }
  557. /***/ }),
  558. /***/ 22:
  559. /***/ (function(module, exports, __webpack_require__) {
  560. var content = __webpack_require__(23);
  561. if(typeof content === 'string') content = [[module.i, content, '']];
  562. var transform;
  563. var insertInto;
  564. var options = {"hmr":true}
  565. options.transform = transform
  566. options.insertInto = undefined;
  567. var update = __webpack_require__(6)(content, options);
  568. if(content.locals) module.exports = content.locals;
  569. if(false) {}
  570. /***/ }),
  571. /***/ 23:
  572. /***/ (function(module, exports, __webpack_require__) {
  573. exports = module.exports = __webpack_require__(5)(false);
  574. // Module
  575. exports.push([module.i, "html{-webkit-tap-highlight-color:transparent}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,'Helvetica Neue',Helvetica,Segoe UI,Arial,Roboto,'PingFang SC',miui,'Hiragino Sans GB','Microsoft Yahei',sans-serif}a{text-decoration:none}button,input,textarea{color:inherit;font:inherit}[class*=van-]:focus,a:focus,button:focus,input:focus,textarea:focus{outline:0}ol,ul{margin:0;padding:0;list-style:none}.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;-webkit-box-orient:vertical}.van-clearfix::after{display:table;clear:both;content:''}[class*=van-hairline]::after{position:absolute;box-sizing:border-box;content:' ';pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #ebedf0;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--top::after{border-top-width:1px}.van-hairline--left::after{border-left-width:1px}.van-hairline--right::after{border-right-width:1px}.van-hairline--bottom::after{border-bottom-width:1px}.van-hairline--top-bottom::after,.van-hairline-unset--top-bottom::after{border-width:1px 0}.van-hairline--surround::after{border-width:1px}@-webkit-keyframes van-slide-up-enter{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes van-slide-up-enter{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes van-slide-up-leave{to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes van-slide-up-leave{to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes van-slide-down-enter{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes van-slide-down-enter{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-webkit-keyframes van-slide-down-leave{to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes van-slide-down-leave{to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-webkit-keyframes van-slide-left-enter{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes van-slide-left-enter{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-webkit-keyframes van-slide-left-leave{to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes van-slide-left-leave{to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-webkit-keyframes van-slide-right-enter{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes van-slide-right-enter{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-webkit-keyframes van-slide-right-leave{to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes van-slide-right-leave{to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-webkit-keyframes van-fade-in{from{opacity:0}to{opacity:1}}@keyframes van-fade-in{from{opacity:0}to{opacity:1}}@-webkit-keyframes van-fade-out{from{opacity:1}to{opacity:0}}@keyframes van-fade-out{from{opacity:1}to{opacity:0}}@-webkit-keyframes van-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes van-rotate{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.van-fade-enter-active{-webkit-animation:.3s van-fade-in both ease-out;animation:.3s van-fade-in both ease-out}.van-fade-leave-active{-webkit-animation:.3s van-fade-out both ease-in;animation:.3s van-fade-out both ease-in
  576. /***/ }),
  577. /***/ 24:
  578. /***/ (function(module, exports, __webpack_require__) {
  579. "use strict";
  580. exports.__esModule = true;
  581. exports.createNamespace = createNamespace;
  582. var _bem = __webpack_require__(25);
  583. var _component = __webpack_require__(26);
  584. var _i18n = __webpack_require__(29);
  585. function createNamespace(name) {
  586. name = 'van-' + name;
  587. return [(0, _component.createComponent)(name), (0, _bem.createBEM)(name), (0, _i18n.createI18N)(name)];
  588. }
  589. /***/ }),
  590. /***/ 25:
  591. /***/ (function(module, exports, __webpack_require__) {
  592. "use strict";
  593. exports.__esModule = true;
  594. exports.createBEM = createBEM;
  595. /**
  596. * bem helper
  597. * b() // 'button'
  598. * b('text') // 'button__text'
  599. * b({ disabled }) // 'button button--disabled'
  600. * b('text', { disabled }) // 'button__text button__text--disabled'
  601. * b(['disabled', 'primary']) // 'button button--disabled button--primary'
  602. */
  603. function gen(name, mods) {
  604. if (!mods) {
  605. return '';
  606. }
  607. if (typeof mods === 'string') {
  608. return " " + name + "--" + mods;
  609. }
  610. if (Array.isArray(mods)) {
  611. return mods.reduce(function (ret, item) {
  612. return ret + gen(name, item);
  613. }, '');
  614. }
  615. return Object.keys(mods).reduce(function (ret, key) {
  616. return ret + (mods[key] ? gen(name, key) : '');
  617. }, '');
  618. }
  619. function createBEM(name) {
  620. return function (el, mods) {
  621. if (el && typeof el !== 'string') {
  622. mods = el;
  623. el = '';
  624. }
  625. el = el ? name + "__" + el : name;
  626. return "" + el + gen(el, mods);
  627. };
  628. }
  629. /***/ }),
  630. /***/ 26:
  631. /***/ (function(module, exports, __webpack_require__) {
  632. "use strict";
  633. var _interopRequireDefault = __webpack_require__(1);
  634. exports.__esModule = true;
  635. exports.unifySlots = unifySlots;
  636. exports.createComponent = createComponent;
  637. __webpack_require__(11);
  638. var _ = __webpack_require__(0);
  639. var _string = __webpack_require__(9);
  640. var _slots = __webpack_require__(28);
  641. var _vue = _interopRequireDefault(__webpack_require__(4));
  642. /**
  643. * Create a basic component with common options
  644. */
  645. function install(Vue) {
  646. var name = this.name;
  647. Vue.component(name, this);
  648. Vue.component((0, _string.camelize)("-" + name), this);
  649. } // unify slots & scopedSlots
  650. function unifySlots(context) {
  651. // use data.scopedSlots in lower Vue version
  652. var scopedSlots = context.scopedSlots || context.data.scopedSlots || {};
  653. var slots = context.slots();
  654. Object.keys(slots).forEach(function (key) {
  655. if (!scopedSlots[key]) {
  656. scopedSlots[key] = function () {
  657. return slots[key];
  658. };
  659. }
  660. });
  661. return scopedSlots;
  662. } // should be removed after Vue 3
  663. function transformFunctionComponent(pure) {
  664. return {
  665. functional: true,
  666. props: pure.props,
  667. model: pure.model,
  668. render: function render(h, context) {
  669. return pure(h, context.props, unifySlots(context), context);
  670. }
  671. };
  672. }
  673. function createComponent(name) {
  674. return function (sfc) {
  675. if ((0, _.isFunction)(sfc)) {
  676. sfc = transformFunctionComponent(sfc);
  677. }
  678. if (!sfc.functional) {
  679. sfc.mixins = sfc.mixins || [];
  680. sfc.mixins.push(_slots.SlotsMixin);
  681. }
  682. sfc.name = name;
  683. sfc.install = install;
  684. return sfc;
  685. };
  686. }
  687. /***/ }),
  688. /***/ 27:
  689. /***/ (function(module, exports, __webpack_require__) {
  690. "use strict";
  691. exports.__esModule = true;
  692. exports.default = void 0;
  693. var _default = {
  694. name: '姓名',
  695. tel: '电话',
  696. save: '保存',
  697. confirm: '确认',
  698. cancel: '取消',
  699. delete: '删除',
  700. complete: '完成',
  701. loading: '加载中...',
  702. telEmpty: '请填写电话',
  703. nameEmpty: '请填写姓名',
  704. nameInvalid: '请输入正确的姓名',
  705. confirmDelete: '确定要删除吗',
  706. telInvalid: '请输入正确的手机号',
  707. vanCalendar: {
  708. end: '结束',
  709. start: '开始',
  710. title: '日期选择',
  711. confirm: '确定',
  712. startEnd: '开始/结束',
  713. weekdays: ['日', '一', '二', '三', '四', '五', '六'],
  714. monthTitle: function monthTitle(year, month) {
  715. return year + "\u5E74" + month + "\u6708";
  716. },
  717. rangePrompt: function rangePrompt(maxRange) {
  718. return "\u9009\u62E9\u5929\u6570\u4E0D\u80FD\u8D85\u8FC7 " + maxRange + " \u5929";
  719. }
  720. },
  721. vanCascader: {
  722. select: '请选择'
  723. },
  724. vanContactCard: {
  725. addText: '添加联系人'
  726. },
  727. vanContactList: {
  728. addText: '新建联系人'
  729. },
  730. vanPagination: {
  731. prev: '上一页',
  732. next: '下一页'
  733. },
  734. vanPullRefresh: {
  735. pulling: '下拉即可刷新...',
  736. loosing: '释放即可刷新...'
  737. },
  738. vanSubmitBar: {
  739. label: '合计:'
  740. },
  741. vanCoupon: {
  742. unlimited: '无使用门槛',
  743. discount: function discount(_discount) {
  744. return _discount + "\u6298";
  745. },
  746. condition: function condition(_condition) {
  747. return "\u6EE1" + _condition + "\u5143\u53EF\u7528";
  748. }
  749. },
  750. vanCouponCell: {
  751. title: '优惠券',
  752. tips: '暂无可用',
  753. count: function count(_count) {
  754. return _count + "\u5F20\u53EF\u7528";
  755. }
  756. },
  757. vanCouponList: {
  758. empty: '暂无优惠券',
  759. exchange: '兑换',
  760. close: '不使用优惠券',
  761. enable: '可用',
  762. disabled: '不可用',
  763. placeholder: '请输入优惠码'
  764. },
  765. vanAddressEdit: {
  766. area: '地区',
  767. postal: '邮政编码',
  768. areaEmpty: '请选择地区',
  769. addressEmpty: '请填写详细地址',
  770. postalEmpty: '邮政编码格式不正确',
  771. defaultAddress: '设为默认收货地址',
  772. telPlaceholder: '收货人手机号',
  773. namePlaceholder: '收货人姓名',
  774. areaPlaceholder: '选择省 / 市 / 区'
  775. },
  776. vanAddressEditDetail: {
  777. label: '详细地址',
  778. placeholder: '街道门牌、楼层房间号等信息'
  779. },
  780. vanAddressList: {
  781. add: '新增地址'
  782. }
  783. };
  784. exports.default = _default;
  785. /***/ }),
  786. /***/ 28:
  787. /***/ (function(module, exports, __webpack_require__) {
  788. "use strict";
  789. exports.__esModule = true;
  790. exports.SlotsMixin = void 0;
  791. /**
  792. * Use scopedSlots in Vue 2.6+
  793. * downgrade to slots in lower version
  794. */
  795. var SlotsMixin = {
  796. methods: {
  797. slots: function slots(name, props) {
  798. if (name === void 0) {
  799. name = 'default';
  800. }
  801. var $slots = this.$slots,
  802. $scopedSlots = this.$scopedSlots;
  803. var scopedSlot = $scopedSlots[name];
  804. if (scopedSlot) {
  805. return scopedSlot(props);
  806. }
  807. return $slots[name];
  808. }
  809. }
  810. };
  811. exports.SlotsMixin = SlotsMixin;
  812. /***/ }),
  813. /***/ 29:
  814. /***/ (function(module, exports, __webpack_require__) {
  815. "use strict";
  816. var _interopRequireDefault = __webpack_require__(1);
  817. exports.__esModule = true;
  818. exports.createI18N = createI18N;
  819. var _ = __webpack_require__(0);
  820. var _string = __webpack_require__(9);
  821. var _locale = _interopRequireDefault(__webpack_require__(11));
  822. function createI18N(name) {
  823. var prefix = (0, _string.camelize)(name) + '.';
  824. return function (path) {
  825. var messages = _locale.default.messages();
  826. var message = (0, _.get)(messages, prefix + path) || (0, _.get)(messages, path);
  827. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  828. args[_key - 1] = arguments[_key];
  829. }
  830. return (0, _.isFunction)(message) ? message.apply(void 0, args) : message;
  831. };
  832. }
  833. /***/ }),
  834. /***/ 30:
  835. /***/ (function(module, exports, __webpack_require__) {
  836. "use strict";
  837. exports.__esModule = true;
  838. exports.on = on;
  839. exports.off = off;
  840. exports.stopPropagation = stopPropagation;
  841. exports.preventDefault = preventDefault;
  842. exports.supportsPassive = void 0;
  843. var _ = __webpack_require__(0);
  844. // eslint-disable-next-line import/no-mutable-exports
  845. var supportsPassive = false;
  846. exports.supportsPassive = supportsPassive;
  847. if (!_.isServer) {
  848. try {
  849. var opts = {};
  850. Object.defineProperty(opts, 'passive', {
  851. // eslint-disable-next-line getter-return
  852. get: function get() {
  853. /* istanbul ignore next */
  854. exports.supportsPassive = supportsPassive = true;
  855. }
  856. });
  857. window.addEventListener('test-passive', null, opts); // eslint-disable-next-line no-empty
  858. } catch (e) {}
  859. }
  860. function on(target, event, handler, passive) {
  861. if (passive === void 0) {
  862. passive = false;
  863. }
  864. if (!_.isServer) {
  865. target.addEventListener(event, handler, supportsPassive ? {
  866. capture: false,
  867. passive: passive
  868. } : false);
  869. }
  870. }
  871. function off(target, event, handler) {
  872. if (!_.isServer) {
  873. target.removeEventListener(event, handler);
  874. }
  875. }
  876. function stopPropagation(event) {
  877. event.stopPropagation();
  878. }
  879. function preventDefault(event, isStopPropagation) {
  880. /* istanbul ignore else */
  881. if (typeof event.cancelable !== 'boolean' || event.cancelable) {
  882. event.preventDefault();
  883. }
  884. if (isStopPropagation) {
  885. stopPropagation(event);
  886. }
  887. }
  888. /***/ }),
  889. /***/ 353:
  890. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  891. "use strict";
  892. __webpack_require__.r(__webpack_exports__);
  893. /* harmony import */ var _tisdesign_m_lib_index_bar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(209);
  894. /* harmony import */ var _tisdesign_m_lib_index_bar__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tisdesign_m_lib_index_bar__WEBPACK_IMPORTED_MODULE_0__);
  895. /* harmony import */ var _tisdesign_m_lib_index_bar_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(354);
  896. /* harmony import */ var _tisdesign_m_lib_index_bar_style__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_tisdesign_m_lib_index_bar_style__WEBPACK_IMPORTED_MODULE_1__);
  897. _tisdesign_m_lib_index_bar__WEBPACK_IMPORTED_MODULE_0___default.a.name = 'm-index-bar';
  898. /* harmony default export */ __webpack_exports__["default"] = (_tisdesign_m_lib_index_bar__WEBPACK_IMPORTED_MODULE_0___default.a);
  899. /***/ }),
  900. /***/ 354:
  901. /***/ (function(module, exports, __webpack_require__) {
  902. __webpack_require__(22);
  903. __webpack_require__(355);
  904. /***/ }),
  905. /***/ 355:
  906. /***/ (function(module, exports, __webpack_require__) {
  907. var content = __webpack_require__(356);
  908. if(typeof content === 'string') content = [[module.i, content, '']];
  909. var transform;
  910. var insertInto;
  911. var options = {"hmr":true}
  912. options.transform = transform
  913. options.insertInto = undefined;
  914. var update = __webpack_require__(6)(content, options);
  915. if(content.locals) module.exports = content.locals;
  916. if(false) {}
  917. /***/ }),
  918. /***/ 356:
  919. /***/ (function(module, exports, __webpack_require__) {
  920. exports = module.exports = __webpack_require__(5)(false);
  921. // Module
  922. exports.push([module.i, ".van-index-bar__sidebar{position:fixed;top:50%;right:0;z-index:2;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;text-align:center;-webkit-transform:translateY(-50%);transform:translateY(-50%);cursor:pointer;-webkit-user-select:none;user-select:none}.van-index-bar__index{padding:0 8px 0 16px;font-weight:500;font-size:10px;line-height:14px}.van-index-bar__index--active{color:#ffce6d}", ""]);
  923. /***/ }),
  924. /***/ 4:
  925. /***/ (function(module, exports) {
  926. module.exports = require("vue");
  927. /***/ }),
  928. /***/ 47:
  929. /***/ (function(module, exports, __webpack_require__) {
  930. "use strict";
  931. exports.__esModule = true;
  932. exports.ChildrenMixin = ChildrenMixin;
  933. exports.ParentMixin = ParentMixin;
  934. var _vnodes = __webpack_require__(48);
  935. function ChildrenMixin(_parent, options) {
  936. var _inject, _computed;
  937. if (options === void 0) {
  938. options = {};
  939. }
  940. var indexKey = options.indexKey || 'index';
  941. return {
  942. inject: (_inject = {}, _inject[_parent] = {
  943. default: null
  944. }, _inject),
  945. computed: (_computed = {
  946. parent: function parent() {
  947. if (this.disableBindRelation) {
  948. return null;
  949. }
  950. return this[_parent];
  951. }
  952. }, _computed[indexKey] = function () {
  953. this.bindRelation();
  954. if (this.parent) {
  955. return this.parent.children.indexOf(this);
  956. }
  957. return null;
  958. }, _computed),
  959. watch: {
  960. disableBindRelation: function disableBindRelation(val) {
  961. if (!val) {
  962. this.bindRelation();
  963. }
  964. }
  965. },
  966. mounted: function mounted() {
  967. this.bindRelation();
  968. },
  969. beforeDestroy: function beforeDestroy() {
  970. var _this = this;
  971. if (this.parent) {
  972. this.parent.children = this.parent.children.filter(function (item) {
  973. return item !== _this;
  974. });
  975. }
  976. },
  977. methods: {
  978. bindRelation: function bindRelation() {
  979. if (!this.parent || this.parent.children.indexOf(this) !== -1) {
  980. return;
  981. }
  982. var children = [].concat(this.parent.children, [this]);
  983. (0, _vnodes.sortChildren)(children, this.parent);
  984. this.parent.children = children;
  985. }
  986. }
  987. };
  988. }
  989. function ParentMixin(parent) {
  990. return {
  991. provide: function provide() {
  992. var _ref;
  993. return _ref = {}, _ref[parent] = this, _ref;
  994. },
  995. data: function data() {
  996. return {
  997. children: []
  998. };
  999. }
  1000. };
  1001. }
  1002. /***/ }),
  1003. /***/ 48:
  1004. /***/ (function(module, exports, __webpack_require__) {
  1005. "use strict";
  1006. exports.__esModule = true;
  1007. exports.sortChildren = sortChildren;
  1008. function flattenVNodes(vnodes) {
  1009. var result = [];
  1010. function traverse(vnodes) {
  1011. vnodes.forEach(function (vnode) {
  1012. result.push(vnode);
  1013. if (vnode.componentInstance) {
  1014. traverse(vnode.componentInstance.$children.map(function (item) {
  1015. return item.$vnode;
  1016. }));
  1017. }
  1018. if (vnode.children) {
  1019. traverse(vnode.children);
  1020. }
  1021. });
  1022. }
  1023. traverse(vnodes);
  1024. return result;
  1025. } // sort children instances by vnodes order
  1026. function sortChildren(children, parent) {
  1027. var componentOptions = parent.$vnode.componentOptions;
  1028. if (!componentOptions || !componentOptions.children) {
  1029. return;
  1030. }
  1031. var vnodes = flattenVNodes(componentOptions.children);
  1032. children.sort(function (a, b) {
  1033. return vnodes.indexOf(a.$vnode) - vnodes.indexOf(b.$vnode);
  1034. });
  1035. }
  1036. /***/ }),
  1037. /***/ 5:
  1038. /***/ (function(module, exports, __webpack_require__) {
  1039. "use strict";
  1040. /*
  1041. MIT License http://www.opensource.org/licenses/mit-license.php
  1042. Author Tobias Koppers @sokra
  1043. */
  1044. // css base code, injected by the css-loader
  1045. module.exports = function (useSourceMap) {
  1046. var list = []; // return the list of modules as css string
  1047. list.toString = function toString() {
  1048. return this.map(function (item) {
  1049. var content = cssWithMappingToString(item, useSourceMap);
  1050. if (item[2]) {
  1051. return '@media ' + item[2] + '{' + content + '}';
  1052. } else {
  1053. return content;
  1054. }
  1055. }).join('');
  1056. }; // import a list of modules into the list
  1057. list.i = function (modules, mediaQuery) {
  1058. if (typeof modules === 'string') {
  1059. modules = [[null, modules, '']];
  1060. }
  1061. var alreadyImportedModules = {};
  1062. for (var i = 0; i < this.length; i++) {
  1063. var id = this[i][0];
  1064. if (id != null) {
  1065. alreadyImportedModules[id] = true;
  1066. }
  1067. }
  1068. for (i = 0; i < modules.length; i++) {
  1069. var item = modules[i]; // skip already imported module
  1070. // this implementation is not 100% perfect for weird media query combinations
  1071. // when a module is imported multiple times with different media queries.
  1072. // I hope this will never occur (Hey this way we have smaller bundles)
  1073. if (item[0] == null || !alreadyImportedModules[item[0]]) {
  1074. if (mediaQuery && !item[2]) {
  1075. item[2] = mediaQuery;
  1076. } else if (mediaQuery) {
  1077. item[2] = '(' + item[2] + ') and (' + mediaQuery + ')';
  1078. }
  1079. list.push(item);
  1080. }
  1081. }
  1082. };
  1083. return list;
  1084. };
  1085. function cssWithMappingToString(item, useSourceMap) {
  1086. var content = item[1] || '';
  1087. var cssMapping = item[3];
  1088. if (!cssMapping) {
  1089. return content;
  1090. }
  1091. if (useSourceMap && typeof btoa === 'function') {
  1092. var sourceMapping = toComment(cssMapping);
  1093. var sourceURLs = cssMapping.sources.map(function (source) {
  1094. return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */';
  1095. });
  1096. return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  1097. }
  1098. return [content].join('\n');
  1099. } // Adapted from convert-source-map (MIT)
  1100. function toComment(sourceMap) {
  1101. // eslint-disable-next-line no-undef
  1102. var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  1103. var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;
  1104. return '/*# ' + data + ' */';
  1105. }
  1106. /***/ }),
  1107. /***/ 51:
  1108. /***/ (function(module, exports, __webpack_require__) {
  1109. "use strict";
  1110. exports.__esModule = true;
  1111. exports.TouchMixin = void 0;
  1112. var _event = __webpack_require__(30);
  1113. var MIN_DISTANCE = 10;
  1114. function getDirection(x, y) {
  1115. if (x > y && x > MIN_DISTANCE) {
  1116. return 'horizontal';
  1117. }
  1118. if (y > x && y > MIN_DISTANCE) {
  1119. return 'vertical';
  1120. }
  1121. return '';
  1122. }
  1123. var TouchMixin = {
  1124. data: function data() {
  1125. return {
  1126. direction: ''
  1127. };
  1128. },
  1129. methods: {
  1130. touchStart: function touchStart(event) {
  1131. this.resetTouchStatus();
  1132. this.startX = event.touches[0].clientX;
  1133. this.startY = event.touches[0].clientY;
  1134. },
  1135. touchMove: function touchMove(event) {
  1136. var touch = event.touches[0];
  1137. this.deltaX = touch.clientX - this.startX;
  1138. this.deltaY = touch.clientY - this.startY;
  1139. this.offsetX = Math.abs(this.deltaX);
  1140. this.offsetY = Math.abs(this.deltaY);
  1141. this.direction = this.direction || getDirection(this.offsetX, this.offsetY);
  1142. },
  1143. resetTouchStatus: function resetTouchStatus() {
  1144. this.direction = '';
  1145. this.deltaX = 0;
  1146. this.deltaY = 0;
  1147. this.offsetX = 0;
  1148. this.offsetY = 0;
  1149. },
  1150. // avoid Vue 2.6 event bubble issues by manually binding events
  1151. // https://github.com/youzan/vant/issues/3015
  1152. bindTouchEvent: function bindTouchEvent(el) {
  1153. var onTouchStart = this.onTouchStart,
  1154. onTouchMove = this.onTouchMove,
  1155. onTouchEnd = this.onTouchEnd;
  1156. (0, _event.on)(el, 'touchstart', onTouchStart);
  1157. (0, _event.on)(el, 'touchmove', onTouchMove);
  1158. if (onTouchEnd) {
  1159. (0, _event.on)(el, 'touchend', onTouchEnd);
  1160. (0, _event.on)(el, 'touchcancel', onTouchEnd);
  1161. }
  1162. }
  1163. }
  1164. };
  1165. exports.TouchMixin = TouchMixin;
  1166. /***/ }),
  1167. /***/ 53:
  1168. /***/ (function(module, exports, __webpack_require__) {
  1169. "use strict";
  1170. exports.__esModule = true;
  1171. exports.getScroller = getScroller;
  1172. exports.getScrollTop = getScrollTop;
  1173. exports.setScrollTop = setScrollTop;
  1174. exports.getRootScrollTop = getRootScrollTop;
  1175. exports.setRootScrollTop = setRootScrollTop;
  1176. exports.getElementTop = getElementTop;
  1177. exports.getVisibleHeight = getVisibleHeight;
  1178. exports.getVisibleTop = getVisibleTop;
  1179. function isWindow(val) {
  1180. return val === window;
  1181. } // get nearest scroll element
  1182. // https://github.com/youzan/vant/issues/3823
  1183. var overflowScrollReg = /scroll|auto/i;
  1184. function getScroller(el, root) {
  1185. if (root === void 0) {
  1186. root = window;
  1187. }
  1188. var node = el;
  1189. while (node && node.tagName !== 'HTML' && node.tagName !== 'BODY' && node.nodeType === 1 && node !== root) {
  1190. var _window$getComputedSt = window.getComputedStyle(node),
  1191. overflowY = _window$getComputedSt.overflowY;
  1192. if (overflowScrollReg.test(overflowY)) {
  1193. return node;
  1194. }
  1195. node = node.parentNode;
  1196. }
  1197. return root;
  1198. }
  1199. function getScrollTop(el) {
  1200. var top = 'scrollTop' in el ? el.scrollTop : el.pageYOffset; // iOS scroll bounce cause minus scrollTop
  1201. return Math.max(top, 0);
  1202. }
  1203. function setScrollTop(el, value) {
  1204. if ('scrollTop' in el) {
  1205. el.scrollTop = value;
  1206. } else {
  1207. el.scrollTo(el.scrollX, value);
  1208. }
  1209. }
  1210. function getRootScrollTop() {
  1211. return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
  1212. }
  1213. function setRootScrollTop(value) {
  1214. setScrollTop(window, value);
  1215. setScrollTop(document.body, value);
  1216. } // get distance from element top to page top or scroller top
  1217. function getElementTop(el, scroller) {
  1218. if (isWindow(el)) {
  1219. return 0;
  1220. }
  1221. var scrollTop = scroller ? getScrollTop(scroller) : getRootScrollTop();
  1222. return el.getBoundingClientRect().top + scrollTop;
  1223. }
  1224. function getVisibleHeight(el) {
  1225. if (isWindow(el)) {
  1226. return el.innerHeight;
  1227. }
  1228. return el.getBoundingClientRect().height;
  1229. }
  1230. function getVisibleTop(el) {
  1231. if (isWindow(el)) {
  1232. return 0;
  1233. }
  1234. return el.getBoundingClientRect().top;
  1235. }
  1236. /***/ }),
  1237. /***/ 6:
  1238. /***/ (function(module, exports, __webpack_require__) {
  1239. /*
  1240. MIT License http://www.opensource.org/licenses/mit-license.php
  1241. Author Tobias Koppers @sokra
  1242. */
  1243. var stylesInDom = {};
  1244. var memoize = function (fn) {
  1245. var memo;
  1246. return function () {
  1247. if (typeof memo === "undefined") memo = fn.apply(this, arguments);
  1248. return memo;
  1249. };
  1250. };
  1251. var isOldIE = memoize(function () {
  1252. // Test for IE <= 9 as proposed by Browserhacks
  1253. // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
  1254. // Tests for existence of standard globals is to allow style-loader
  1255. // to operate correctly into non-standard environments
  1256. // @see https://github.com/webpack-contrib/style-loader/issues/177
  1257. return window && document && document.all && !window.atob;
  1258. });
  1259. var getTarget = function (target, parent) {
  1260. if (parent){
  1261. return parent.querySelector(target);
  1262. }
  1263. return document.querySelector(target);
  1264. };
  1265. var getElement = (function (fn) {
  1266. var memo = {};
  1267. return function(target, parent) {
  1268. // If passing function in options, then use it for resolve "head" element.
  1269. // Useful for Shadow Root style i.e
  1270. // {
  1271. // insertInto: function () { return document.querySelector("#foo").shadowRoot }
  1272. // }
  1273. if (typeof target === 'function') {
  1274. return target();
  1275. }
  1276. if (typeof memo[target] === "undefined") {
  1277. var styleTarget = getTarget.call(this, target, parent);
  1278. // Special case to return head of iframe instead of iframe itself
  1279. if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
  1280. try {
  1281. // This will throw an exception if access to iframe is blocked
  1282. // due to cross-origin restrictions
  1283. styleTarget = styleTarget.contentDocument.head;
  1284. } catch(e) {
  1285. styleTarget = null;
  1286. }
  1287. }
  1288. memo[target] = styleTarget;
  1289. }
  1290. return memo[target]
  1291. };
  1292. })();
  1293. var singleton = null;
  1294. var singletonCounter = 0;
  1295. var stylesInsertedAtTop = [];
  1296. var fixUrls = __webpack_require__(12);
  1297. module.exports = function(list, options) {
  1298. if (typeof DEBUG !== "undefined" && DEBUG) {
  1299. if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
  1300. }
  1301. options = options || {};
  1302. options.attrs = typeof options.attrs === "object" ? options.attrs : {};
  1303. // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  1304. // tags it will allow on a page
  1305. if (!options.singleton && typeof options.singleton !== "boolean") options.singleton = isOldIE();
  1306. // By default, add <style> tags to the <head> element
  1307. if (!options.insertInto) options.insertInto = "head";
  1308. // By default, add <style> tags to the bottom of the target
  1309. if (!options.insertAt) options.insertAt = "bottom";
  1310. var styles = listToStyles(list, options);
  1311. addStylesToDom(styles, options);
  1312. return function update (newList) {
  1313. var mayRemove = [];
  1314. for (var i = 0; i < styles.length; i++) {
  1315. var item = styles[i];
  1316. var domStyle = stylesInDom[item.id];
  1317. domStyle.refs--;
  1318. mayRemove.push(domStyle);
  1319. }
  1320. if(newList) {
  1321. var newStyles = listToStyles(newList, options);
  1322. addStylesToDom(newStyles, options);
  1323. }
  1324. for (var i = 0; i < mayRemove.length; i++) {
  1325. var domStyle = mayRemove[i];
  1326. if(domStyle.refs === 0) {
  1327. for (var j = 0; j < domStyle.parts.length; j++) domStyle.parts[j]();
  1328. delete stylesInDom[domStyle.id];
  1329. }
  1330. }
  1331. };
  1332. };
  1333. function addStylesToDom (styles, options) {
  1334. for (var i = 0; i < styles.length; i++) {
  1335. var item = styles[i];
  1336. var domStyle = stylesInDom[item.id];
  1337. if(domStyle) {
  1338. domStyle.refs++;
  1339. for(var j = 0; j < domStyle.parts.length; j++) {
  1340. domStyle.parts[j](item.parts[j]);
  1341. }
  1342. for(; j < item.parts.length; j++) {
  1343. domStyle.parts.push(addStyle(item.parts[j], options));
  1344. }
  1345. } else {
  1346. var parts = [];
  1347. for(var j = 0; j < item.parts.length; j++) {
  1348. parts.push(addStyle(item.parts[j], options));
  1349. }
  1350. stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
  1351. }
  1352. }
  1353. }
  1354. function listToStyles (list, options) {
  1355. var styles = [];
  1356. var newStyles = {};
  1357. for (var i = 0; i < list.length; i++) {
  1358. var item = list[i];
  1359. var id = options.base ? item[0] + options.base : item[0];
  1360. var css = item[1];
  1361. var media = item[2];
  1362. var sourceMap = item[3];
  1363. var part = {css: css, media: media, sourceMap: sourceMap};
  1364. if(!newStyles[id]) styles.push(newStyles[id] = {id: id, parts: [part]});
  1365. else newStyles[id].parts.push(part);
  1366. }
  1367. return styles;
  1368. }
  1369. function insertStyleElement (options, style) {
  1370. var target = getElement(options.insertInto)
  1371. if (!target) {
  1372. throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");
  1373. }
  1374. var lastStyleElementInsertedAtTop = stylesInsertedAtTop[stylesInsertedAtTop.length - 1];
  1375. if (options.insertAt === "top") {
  1376. if (!lastStyleElementInsertedAtTop) {
  1377. target.insertBefore(style, target.firstChild);
  1378. } else if (lastStyleElementInsertedAtTop.nextSibling) {
  1379. target.insertBefore(style, lastStyleElementInsertedAtTop.nextSibling);
  1380. } else {
  1381. target.appendChild(style);
  1382. }
  1383. stylesInsertedAtTop.push(style);
  1384. } else if (options.insertAt === "bottom") {
  1385. target.appendChild(style);
  1386. } else if (typeof options.insertAt === "object" && options.insertAt.before) {
  1387. var nextSibling = getElement(options.insertAt.before, target);
  1388. target.insertBefore(style, nextSibling);
  1389. } else {
  1390. throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");
  1391. }
  1392. }
  1393. function removeStyleElement (style) {
  1394. if (style.parentNode === null) return false;
  1395. style.parentNode.removeChild(style);
  1396. var idx = stylesInsertedAtTop.indexOf(style);
  1397. if(idx >= 0) {
  1398. stylesInsertedAtTop.splice(idx, 1);
  1399. }
  1400. }
  1401. function createStyleElement (options) {
  1402. var style = document.createElement("style");
  1403. if(options.attrs.type === undefined) {
  1404. options.attrs.type = "text/css";
  1405. }
  1406. if(options.attrs.nonce === undefined) {
  1407. var nonce = getNonce();
  1408. if (nonce) {
  1409. options.attrs.nonce = nonce;
  1410. }
  1411. }
  1412. addAttrs(style, options.attrs);
  1413. insertStyleElement(options, style);
  1414. return style;
  1415. }
  1416. function createLinkElement (options) {
  1417. var link = document.createElement("link");
  1418. if(options.attrs.type === undefined) {
  1419. options.attrs.type = "text/css";
  1420. }
  1421. options.attrs.rel = "stylesheet";
  1422. addAttrs(link, options.attrs);
  1423. insertStyleElement(options, link);
  1424. return link;
  1425. }
  1426. function addAttrs (el, attrs) {
  1427. Object.keys(attrs).forEach(function (key) {
  1428. el.setAttribute(key, attrs[key]);
  1429. });
  1430. }
  1431. function getNonce() {
  1432. if (false) {}
  1433. return __webpack_require__.nc;
  1434. }
  1435. function addStyle (obj, options) {
  1436. var style, update, remove, result;
  1437. // If a transform function was defined, run it on the css
  1438. if (options.transform && obj.css) {
  1439. result = typeof options.transform === 'function'
  1440. ? options.transform(obj.css)
  1441. : options.transform.default(obj.css);
  1442. if (result) {
  1443. // If transform returns a value, use that instead of the original css.
  1444. // This allows running runtime transformations on the css.
  1445. obj.css = result;
  1446. } else {
  1447. // If the transform function returns a falsy value, don't add this css.
  1448. // This allows conditional loading of css
  1449. return function() {
  1450. // noop
  1451. };
  1452. }
  1453. }
  1454. if (options.singleton) {
  1455. var styleIndex = singletonCounter++;
  1456. style = singleton || (singleton = createStyleElement(options));
  1457. update = applyToSingletonTag.bind(null, style, styleIndex, false);
  1458. remove = applyToSingletonTag.bind(null, style, styleIndex, true);
  1459. } else if (
  1460. obj.sourceMap &&
  1461. typeof URL === "function" &&
  1462. typeof URL.createObjectURL === "function" &&
  1463. typeof URL.revokeObjectURL === "function" &&
  1464. typeof Blob === "function" &&
  1465. typeof btoa === "function"
  1466. ) {
  1467. style = createLinkElement(options);
  1468. update = updateLink.bind(null, style, options);
  1469. remove = function () {
  1470. removeStyleElement(style);
  1471. if(style.href) URL.revokeObjectURL(style.href);
  1472. };
  1473. } else {
  1474. style = createStyleElement(options);
  1475. update = applyToTag.bind(null, style);
  1476. remove = function () {
  1477. removeStyleElement(style);
  1478. };
  1479. }
  1480. update(obj);
  1481. return function updateStyle (newObj) {
  1482. if (newObj) {
  1483. if (
  1484. newObj.css === obj.css &&
  1485. newObj.media === obj.media &&
  1486. newObj.sourceMap === obj.sourceMap
  1487. ) {
  1488. return;
  1489. }
  1490. update(obj = newObj);
  1491. } else {
  1492. remove();
  1493. }
  1494. };
  1495. }
  1496. var replaceText = (function () {
  1497. var textStore = [];
  1498. return function (index, replacement) {
  1499. textStore[index] = replacement;
  1500. return textStore.filter(Boolean).join('\n');
  1501. };
  1502. })();
  1503. function applyToSingletonTag (style, index, remove, obj) {
  1504. var css = remove ? "" : obj.css;
  1505. if (style.styleSheet) {
  1506. style.styleSheet.cssText = replaceText(index, css);
  1507. } else {
  1508. var cssNode = document.createTextNode(css);
  1509. var childNodes = style.childNodes;
  1510. if (childNodes[index]) style.removeChild(childNodes[index]);
  1511. if (childNodes.length) {
  1512. style.insertBefore(cssNode, childNodes[index]);
  1513. } else {
  1514. style.appendChild(cssNode);
  1515. }
  1516. }
  1517. }
  1518. function applyToTag (style, obj) {
  1519. var css = obj.css;
  1520. var media = obj.media;
  1521. if(media) {
  1522. style.setAttribute("media", media)
  1523. }
  1524. if(style.styleSheet) {
  1525. style.styleSheet.cssText = css;
  1526. } else {
  1527. while(style.firstChild) {
  1528. style.removeChild(style.firstChild);
  1529. }
  1530. style.appendChild(document.createTextNode(css));
  1531. }
  1532. }
  1533. function updateLink (link, options, obj) {
  1534. var css = obj.css;
  1535. var sourceMap = obj.sourceMap;
  1536. /*
  1537. If convertToAbsoluteUrls isn't defined, but sourcemaps are enabled
  1538. and there is no publicPath defined then lets turn convertToAbsoluteUrls
  1539. on by default. Otherwise default to the convertToAbsoluteUrls option
  1540. directly
  1541. */
  1542. var autoFixUrls = options.convertToAbsoluteUrls === undefined && sourceMap;
  1543. if (options.convertToAbsoluteUrls || autoFixUrls) {
  1544. css = fixUrls(css);
  1545. }
  1546. if (sourceMap) {
  1547. // http://stackoverflow.com/a/26603875
  1548. css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
  1549. }
  1550. var blob = new Blob([css], { type: "text/css" });
  1551. var oldSrc = link.href;
  1552. link.href = URL.createObjectURL(blob);
  1553. if(oldSrc) URL.revokeObjectURL(oldSrc);
  1554. }
  1555. /***/ }),
  1556. /***/ 60:
  1557. /***/ (function(module, exports, __webpack_require__) {
  1558. "use strict";
  1559. exports.__esModule = true;
  1560. exports.BindEventMixin = BindEventMixin;
  1561. var _event = __webpack_require__(30);
  1562. /**
  1563. * Bind event when mounted or activated
  1564. */
  1565. var uid = 0;
  1566. function BindEventMixin(handler) {
  1567. var key = "binded_" + uid++;
  1568. function bind() {
  1569. if (!this[key]) {
  1570. handler.call(this, _event.on, true);
  1571. this[key] = true;
  1572. }
  1573. }
  1574. function unbind() {
  1575. if (this[key]) {
  1576. handler.call(this, _event.off, false);
  1577. this[key] = false;
  1578. }
  1579. }
  1580. return {
  1581. mounted: bind,
  1582. activated: bind,
  1583. deactivated: unbind,
  1584. beforeDestroy: unbind
  1585. };
  1586. }
  1587. /***/ }),
  1588. /***/ 9:
  1589. /***/ (function(module, exports, __webpack_require__) {
  1590. "use strict";
  1591. exports.__esModule = true;
  1592. exports.camelize = camelize;
  1593. exports.padZero = padZero;
  1594. var camelizeRE = /-(\w)/g;
  1595. function camelize(str) {
  1596. return str.replace(camelizeRE, function (_, c) {
  1597. return c.toUpperCase();
  1598. });
  1599. }
  1600. function padZero(num, targetLength) {
  1601. if (targetLength === void 0) {
  1602. targetLength = 2;
  1603. }
  1604. var str = num + '';
  1605. while (str.length < targetLength) {
  1606. str = '0' + str;
  1607. }
  1608. return str;
  1609. }
  1610. /***/ }),
  1611. /***/ 94:
  1612. /***/ (function(module, exports, __webpack_require__) {
  1613. "use strict";
  1614. exports.__esModule = true;
  1615. exports.isHidden = isHidden;
  1616. function isHidden(el) {
  1617. var style = window.getComputedStyle(el);
  1618. var hidden = style.display === 'none'; // offsetParent returns null in the following situations:
  1619. // 1. The element or its parent element has the display property set to none.
  1620. // 2. The element has the position property set to fixed
  1621. var parentHidden = el.offsetParent === null && style.position !== 'fixed';
  1622. return hidden || parentHidden;
  1623. }
  1624. /***/ })
  1625. /******/ });