picker.min.js 62 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673
  1. !
  2. function(e, t) {
  3. "object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.Picker = t() : e.Picker = t()
  4. }(this, function() {
  5. return function(e) {
  6. function t(n) {
  7. if (i[n]) return i[n].exports;
  8. var r = i[n] = {
  9. exports: {},
  10. id: n,
  11. loaded: !1
  12. };
  13. return e[n].call(r.exports, r, r.exports, t), r.loaded = !0, r.exports
  14. }
  15. var i = {};
  16. return t.m = e, t.c = i, t.p = "", t(0)
  17. }([function(e, t, i) {
  18. "use strict";
  19. function n(e) {
  20. return e && e.__esModule ? e : {
  21. default:
  22. e
  23. }
  24. }
  25. t.__esModule = !0;
  26. var r = i(1),
  27. o = n(r);
  28. o.
  29. default.version = "1.1.2", t.
  30. default = o.
  31. default, e.exports = t.
  32. default
  33. }, function(e, t, i) {
  34. "use strict";
  35. function n(e) {
  36. return e && e.__esModule ? e : {
  37. default:
  38. e
  39. }
  40. }
  41. function r(e, t) {
  42. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  43. }
  44. function o(e, t) {
  45. if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  46. return !t || "object" != typeof t && "function" != typeof t ? e : t
  47. }
  48. function s(e, t) {
  49. if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
  50. e.prototype = Object.create(t && t.prototype, {
  51. constructor: {
  52. value: e,
  53. enumerable: !1,
  54. writable: !0,
  55. configurable: !0
  56. }
  57. }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
  58. }
  59. t.__esModule = !0;
  60. var a = function() {
  61. function e(e, t) {
  62. for (var i = 0; i < t.length; i++) {
  63. var n = t[i];
  64. n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
  65. }
  66. }
  67. return function(t, i, n) {
  68. return i && e(t.prototype, i), n && e(t, n), t
  69. }
  70. }(),
  71. l = i(2),
  72. h = n(l),
  73. c = i(3),
  74. p = n(c),
  75. u = i(4),
  76. f = i(5),
  77. d = i(6),
  78. m = n(d),
  79. v = i(14),
  80. g = n(v);
  81. i(15);
  82. var y = function(e) {
  83. function t(e) {
  84. r(this, t);
  85. var i = o(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));
  86. return i.options = {
  87. data: [],
  88. title: "",
  89. selectedIndex: null,
  90. showCls: "show"
  91. }, (0, u.extend)(i.options, e), i.data = i.options.data, i.pickerEl = (0, f.createDom)((0, m.
  92. default)({
  93. data: i.data,
  94. title: i.options.title
  95. })), document.body.appendChild(i.pickerEl), i.maskEl = i.pickerEl.getElementsByClassName("mask-hook")[0], i.wheelEl = i.pickerEl.getElementsByClassName("wheel-hook"), i.panelEl = i.pickerEl.getElementsByClassName("panel-hook")[0], i.confirmEl = i.pickerEl.getElementsByClassName("confirm-hook")[0], i.cancelEl = i.pickerEl.getElementsByClassName("cancel-hook")[0], i.scrollEl = i.pickerEl.getElementsByClassName("wheel-scroll-hook"), i._init(), i
  96. }
  97. return s(t, e), a(t, [{
  98. key: "_init",
  99. value: function() {
  100. if (this.selectedIndex = [], this.selectedVal = [], this.options.selectedIndex) this.selectedIndex = this.options.selectedIndex;
  101. else for (var e = 0; e < this.data.length; e++) this.selectedIndex[e] = 0;
  102. this._bindEvent();
  103. }
  104. }, {
  105. key: "_bindEvent",
  106. value: function() {
  107. var e = this;
  108. (0, f.addEvent)(this.pickerEl, "touchmove", function(e) {
  109. e.preventDefault()
  110. }), (0, f.addEvent)(this.confirmEl, "click", function() {
  111. console.log(e.selectedIndex+"...");
  112. e.hide();
  113. for (var t = !1, i = 0; i < e.data.length; i++) {
  114. var n = e.wheels[i].getSelectedIndex();
  115. e.selectedIndex[i] = n;
  116. var r = null;
  117. e.data[i].length && (r = e.data[i][n].value), e.selectedVal[i] !== r && (t = !0), e.selectedVal[i] = r
  118. }
  119. $("#select_demo").val(e.selectedVal[0]+"-"+e.selectedVal[1]+"-"+e.selectedVal[2]);
  120. e.trigger("picker.select", e.selectedVal, e.selectedIndex), t && e.trigger("picker.valuechange", e.selectedVal, e.selectedIndex)
  121. }), (0, f.addEvent)(this.cancelEl, "click", function() {
  122. e.hide(), e.trigger("picker.cancel")
  123. })
  124. }
  125. }, {
  126. key: "_createWheel",
  127. value: function(e, t) {
  128. var i = this;
  129. return this.wheels[t] = new h.
  130. default (e[t], {
  131. wheel: !0,
  132. selectedIndex: this.selectedIndex[t]
  133. }), function(e) {
  134. i.wheels[e].on("scrollEnd", function() {
  135. var n = i.wheels[e].getSelectedIndex();
  136. i.selectedIndex[t] !== n && (i.selectedIndex[t] = n, i.trigger("picker.change", e, n))
  137. })
  138. }(t), this.wheels[t]
  139. }
  140. }, {
  141. key: "show",
  142. value: function(e) {
  143. var t = this;
  144. this.pickerEl.style.display = "block";
  145. var i = this.options.showCls;
  146. window.setTimeout(function() {
  147. if ((0, f.addClass)(t.maskEl, i), (0, f.addClass)(t.panelEl, i), t.wheels) for (var n = 0; n < t.data.length; n++) t.wheels[n].enable(), t.wheels[n].wheelTo(t.selectedIndex[n]);
  148. else {
  149. t.wheels = [];
  150. for (var r = 0; r < t.data.length; r++) t._createWheel(t.wheelEl, r)
  151. }
  152. e && e()
  153. }, 0)
  154. }
  155. }, {
  156. key: "hide",
  157. value: function() {
  158. var e = this,
  159. t = this.options.showCls;
  160. (0, f.removeClass)(this.maskEl, t), (0, f.removeClass)(this.panelEl, t), window.setTimeout(function() {
  161. e.pickerEl.style.display = "none";
  162. for (var t = 0; t < e.data.length; t++) e.wheels[t].disable()
  163. }, 500)
  164. }
  165. }, {
  166. key: "refillColumn",
  167. value: function(e, t) {
  168. var i = this.scrollEl[e],
  169. n = this.wheels[e];
  170. if (i && n) {
  171. var r = this.data[e];
  172. this.data[e] = t, i.innerHTML = (0, g.
  173. default)(t);
  174. var o = n.getSelectedIndex(),
  175. s = 0;
  176. if (r.length) for (var a = r[o].value, l = 0; l < t.length; l++) if (t[l].value === a) {
  177. s = l;
  178. break
  179. }
  180. return this.selectedIndex[e] = s, n.refresh(), n.wheelTo(s), s
  181. }
  182. }
  183. }, {
  184. key: "refill",
  185. value: function(e) {
  186. var t = this,
  187. i = [];
  188. return e.length ? (e.forEach(function(e, n) {
  189. i[n] = t.refillColumn(n, e)
  190. }), i) : i
  191. }
  192. }, {
  193. key: "scrollColumn",
  194. value: function(e, t) {
  195. var i = this.wheels[e];
  196. i.wheelTo(t)
  197. }
  198. }]), t
  199. }(p.
  200. default);
  201. t.
  202. default = y, e.exports = t.
  203. default
  204. }, function(e, t, i) {
  205. !
  206. function(t, i) {
  207. e.exports = i()
  208. }(this, function() {
  209. return function(e) {
  210. function t(n) {
  211. if (i[n]) return i[n].exports;
  212. var r = i[n] = {
  213. exports: {},
  214. id: n,
  215. loaded: !1
  216. };
  217. return e[n].call(r.exports, r, r.exports, t), r.loaded = !0, r.exports
  218. }
  219. var i = {};
  220. return t.m = e, t.c = i, t.p = "/assets/", t(0)
  221. }([function(e, t, i) {
  222. "use strict";
  223. var n = i(1);
  224. n.BScroll.Version = "0.1.14", e.exports = n.BScroll
  225. }, function(e, t, i) {
  226. "use strict";
  227. function n(e, t) {
  228. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  229. }
  230. function r(e, t) {
  231. if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  232. return !t || "object" != typeof t && "function" != typeof t ? e : t
  233. }
  234. function o(e, t) {
  235. if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
  236. e.prototype = Object.create(t && t.prototype, {
  237. constructor: {
  238. value: e,
  239. enumerable: !1,
  240. writable: !0,
  241. configurable: !0
  242. }
  243. }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
  244. }
  245. Object.defineProperty(t, "__esModule", {
  246. value: !0
  247. }), t.BScroll = void 0;
  248. var s = function() {
  249. function e(e, t) {
  250. for (var i = 0; i < t.length; i++) {
  251. var n = t[i];
  252. n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
  253. }
  254. }
  255. return function(t, i, n) {
  256. return i && e(t.prototype, i), n && e(t, n), t
  257. }
  258. }(),
  259. a = i(2),
  260. l = 1;
  261. t.BScroll = function(e) {
  262. function t(e, i) {
  263. n(this, t);
  264. var o = r(this, Object.getPrototypeOf(t).call(this));
  265. return o.wrapper = "string" == typeof e ? document.querySelector(e) : e, o.scroller = o.wrapper.children[0], o.scrollerStyle = o.scroller.style, o.options = {
  266. startX: 0,
  267. startY: 0,
  268. scrollY: !0,
  269. directionLockThreshold: 5,
  270. momentum: !0,
  271. bounce: !0,
  272. selectedIndex: 0,
  273. rotate: 25,
  274. wheel: !1,
  275. snap: !1,
  276. snapLoop: !1,
  277. snapThreshold: .1,
  278. swipeTime: 2500,
  279. bounceTime: 700,
  280. adjustTime: 400,
  281. swipeBounceTime: 1200,
  282. deceleration: .001,
  283. momentumLimitTime: 300,
  284. momentumLimitDistance: 15,
  285. resizePolling: 60,
  286. preventDefault: !0,
  287. preventDefaultException: {
  288. tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT)$/
  289. },
  290. HWCompositing: !0,
  291. useTransition: !0,
  292. useTransform: !0
  293. }, (0, a.extend)(o.options, i), o.translateZ = o.options.HWCompositing && a.hasPerspective ? " translateZ(0)" : "", o.options.useTransition = o.options.useTransition && a.hasTransition, o.options.useTransform = o.options.useTransform && a.hasTransform, o.options.eventPassthrough = o.options.eventPassthrough === !0 ? "vertical" : o.options.eventPassthrough, o.options.preventDefault = !o.options.eventPassthrough && o.options.preventDefault, o.options.scrollX = "horizontal" !== o.options.eventPassthrough && o.options.scrollX, o.options.scrollY = "vertical" !== o.options.eventPassthrough && o.options.scrollY, o.options.freeScroll = o.options.freeScroll && !o.options.eventPassthrough, o.options.directionLockThreshold = o.options.eventPassthrough ? 0 : o.options.directionLockThreshold, o.options.tap === !0 && (o.options.tap = "tap"), o._init(), o.options.snap && o._initSnap(), o.refresh(), o.options.snap || o.scrollTo(o.options.startX, o.options.startY), o.enable(), o
  294. }
  295. return o(t, e), s(t, [{
  296. key: "_init",
  297. value: function() {
  298. this.x = 0, this.y = 0, this.directionX = 0, this.directionY = 0, this._addEvents()
  299. }
  300. }, {
  301. key: "_initSnap",
  302. value: function() {
  303. var e = this;
  304. if (this.currentPage = {}, this.options.snapLoop) {
  305. var t = this.scroller.children;
  306. t.length > 0 && ((0, a.prepend)(t[t.length - 1].cloneNode(!0), this.scroller), this.scroller.appendChild(t[1].cloneNode(!0)))
  307. }
  308. "string" == typeof this.options.snap && (this.options.snap = this.scroller.querySelectorAll(this.options.snap)), this.on("refresh", function() {
  309. if (e.pages = [], e.wrapperWidth && e.wrapperHeight && e.scrollerWidth && e.scrollerHeight) {
  310. var t = e.options.snapStepX || e.wrapperWidth,
  311. i = e.options.snapStepY || e.wrapperHeight,
  312. n = 0,
  313. r = void 0,
  314. o = void 0,
  315. s = void 0,
  316. l = 0,
  317. h = void 0,
  318. c = 0,
  319. p = void 0,
  320. u = void 0,
  321. f = void 0;
  322. if (e.options.snap === !0) for (o = Math.round(t / 2), s = Math.round(i / 2); n > -e.scrollerWidth;) {
  323. for (e.pages[l] = [], h = 0, r = 0; r > -e.scrollerHeight;) e.pages[l][h] = {
  324. x: Math.max(n, e.maxScrollX),
  325. y: Math.max(r, e.maxScrollY),
  326. width: t,
  327. height: i,
  328. cx: n - o,
  329. cy: r - s
  330. }, r -= i, h++;
  331. n -= t, l++
  332. } else for (u = e.options.snap, h = u.length, p = -1; l < h; l++) f = (0, a.getRect)(u[l]), (0 === l || f.left <= (0, a.getRect)(u[l - 1]).left) && (c = 0, p++), e.pages[c] || (e.pages[c] = []), n = Math.max(-f.left, e.maxScrollX), r = Math.max(-f.top, e.maxScrollY), o = n - Math.round(f.width / 2), s = r - Math.round(f.height / 2), e.pages[c][p] = {
  333. x: n,
  334. y: r,
  335. width: f.width,
  336. height: f.height,
  337. cx: o,
  338. cy: s
  339. }, n > e.maxScrollX && c++;
  340. var d = e.options.snapLoop ? 1 : 0;
  341. e.goToPage(e.currentPage.pageX || d, e.currentPage.pageY || 0, 0), e.options.snapThreshold % 1 === 0 ? (e.snapThresholdX = e.options.snapThreshold, e.snapThresholdY = e.options.snapThreshold) : (e.snapThresholdX = Math.round(e.pages[e.currentPage.pageX][e.currentPage.pageY].width * e.options.snapThreshold), e.snapThresholdY = Math.round(e.pages[e.currentPage.pageX][e.currentPage.pageY].height * e.options.snapThreshold))
  342. }
  343. }), this.on("scrollEnd", function() {
  344. e.options.snapLoop && (0 === e.currentPage.pageX && e.goToPage(e.pages.length - 2, e.currentPage.pageY, 0), e.currentPage.pageX === e.pages.length - 1 && e.goToPage(1, e.currentPage.pageY, 0))
  345. }), this.on("flick", function() {
  346. var t = e.options.snapSpeed || Math.max(Math.max(Math.min(Math.abs(e.x - e.startX), 1e3), Math.min(Math.abs(e.y - e.startY), 1e3)), 300);
  347. e.goToPage(e.currentPage.pageX + e.directionX, e.currentPage.pageY + e.directionY, t)
  348. })
  349. }
  350. }, {
  351. key: "_nearestSnap",
  352. value: function(e, t) {
  353. if (!this.pages.length) return {
  354. x: 0,
  355. y: 0,
  356. pageX: 0,
  357. pageY: 0
  358. };
  359. var i = 0;
  360. if (Math.abs(e - this.absStartX) < this.snapThresholdX && Math.abs(t - this.absStartY) < this.snapThresholdY) return this.currentPage;
  361. e > 0 ? e = 0 : e < this.maxScrollX && (e = this.maxScrollX), t > 0 ? t = 0 : t < this.maxScrollY && (t = this.maxScrollY);
  362. for (var n = this.pages.length; i < n; i++) if (e >= this.pages[i][0].cx) {
  363. e = this.pages[i][0].x;
  364. break
  365. }
  366. n = this.pages[i].length;
  367. for (var r = 0; r < n; r++) if (t >= this.pages[0][r].cy) {
  368. t = this.pages[0][r].y;
  369. break
  370. }
  371. return i === this.currentPage.pageX && (i += this.directionX, i < 0 ? i = 0 : i >= this.pages.length && (i = this.pages.length - 1), e = this.pages[i][0].x), r === this.currentPage.pageY && (r += this.directionY, r < 0 ? r = 0 : r >= this.pages[0].length && (r = this.pages[0].length - 1), t = this.pages[0][r].y), {
  372. x: e,
  373. y: t,
  374. pageX: i,
  375. pageY: r
  376. }
  377. }
  378. }, {
  379. key: "_addEvents",
  380. value: function() {
  381. var e = a.addEvent;
  382. this._handleEvents(e)
  383. }
  384. }, {
  385. key: "_removeEvents",
  386. value: function() {
  387. var e = a.removeEvent;
  388. this._handleEvents(e)
  389. }
  390. }, {
  391. key: "_handleEvents",
  392. value: function(e) {
  393. var t = this.options.bindToWrapper ? this.wrapper : window;
  394. e(window, "orientationchange", this), e(window, "resize", this), this.options.click && e(this.wrapper, "click", this), this.options.disableMouse || (e(this.wrapper, "mousedown", this), e(t, "mousemove", this), e(t, "mousecancel", this), e(t, "mouseup", this)), a.hasTouch && !this.options.disableTouch && (e(this.wrapper, "touchstart", this), e(t, "touchmove", this), e(t, "touchcancel", this), e(t, "touchend", this)), e(this.scroller, a.style.transitionEnd, this)
  395. }
  396. }, {
  397. key: "_start",
  398. value: function(e) {
  399. var t = a.eventType[e.type];
  400. if ((t === l || 0 === e.button) && this.enabled && (!this.initiated || this.initiated === t)) {
  401. if (this.initiated = t, !this.options.preventDefault || a.isBadAndroid || (0, a.preventDefaultException)(e.target, this.options.preventDefaultException) || e.preventDefault(), this.moved = !1, this.distX = 0, this.distY = 0, this.directionX = 0, this.directionY = 0, this.directionLocked = 0, this._transitionTime(), this.startTime = +new Date, this.options.wheel && (this.target = e.target), this.options.useTransition && this.isInTransition) {
  402. this.isInTransition = !1;
  403. var i = this.getComputedPosition();
  404. this._translate(i.x, i.y), this.options.wheel ? this.target = this.items[Math.round(-i.y / this.itemHeight)] : this.trigger("scrollEnd")
  405. }
  406. var n = e.touches ? e.touches[0] : e;
  407. this.startX = this.x, this.startY = this.y, this.absStartX = this.x, this.absStartY = this.y, this.pointX = n.pageX, this.pointY = n.pageY, this.trigger("beforeScrollStart")
  408. }
  409. }
  410. }, {
  411. key: "_move",
  412. value: function(e) {
  413. if (this.enabled && a.eventType[e.type] === this.initiated) {
  414. this.options.preventDefault && e.preventDefault();
  415. var t = e.touches ? e.touches[0] : e,
  416. i = t.pageX - this.pointX,
  417. n = t.pageY - this.pointY;
  418. this.pointX = t.pageX, this.pointY = t.pageY, this.distX += i, this.distY += n;
  419. var r = Math.abs(this.distX),
  420. o = Math.abs(this.distY),
  421. s = +new Date;
  422. if (!(s - this.endTime > this.options.momentumLimitTime && o < this.options.momentumLimitDistance && r < this.options.momentumLimitDistance)) {
  423. if (this.directionLocked || this.options.freeScroll || (r > o + this.options.directionLockThreshold ? this.directionLocked = "h" : o >= r + this.options.directionLockThreshold ? this.directionLocked = "v" : this.directionLocked = "n"), "h" === this.directionLocked) {
  424. if ("vertical" === this.options.eventPassthrough) e.preventDefault();
  425. else if ("horizontal" === this.options.eventPassthrough) return void(this.initiated = !1);
  426. n = 0
  427. } else if ("v" === this.directionLocked) {
  428. if ("horizontal" === this.options.eventPassthrough) e.preventDefault();
  429. else if ("vertical" === this.options.eventPassthrough) return void(this.initiated = !1);
  430. i = 0
  431. }
  432. i = this.hasHorizontalScroll ? i : 0, n = this.hasVerticalScroll ? n : 0;
  433. var l = this.x + i,
  434. h = this.y + n;
  435. (l > 0 || l < this.maxScrollX) && (l = this.options.bounce ? this.x + i / 3 : l > 0 ? 0 : this.maxScrollX), (h > 0 || h < this.maxScrollY) && (h = this.options.bounce ? this.y + n / 3 : h > 0 ? 0 : this.maxScrollY), this.directionX = i > 0 ? -1 : i < 0 ? 1 : 0, this.directionY = n > 0 ? -1 : n < 0 ? 1 : 0, this.moved || (this.moved = !0, this.trigger("scrollStart")), this._translate(l, h), s - this.startTime > this.options.momentumLimitTime && (this.startTime = s, this.startX = this.x, this.startY = this.y, 1 === this.options.probeType && this.trigger("scroll", {
  436. x: this.x,
  437. y: this.y
  438. })), this.options.probeType > 1 && this.trigger("scroll", {
  439. x: this.x,
  440. y: this.y
  441. });
  442. var c = document.documentElement.scrollLeft || window.pageXOffset || document.body.scrollLeft,
  443. p = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop,
  444. u = this.pointX - c,
  445. f = this.pointY - p;
  446. (u > document.documentElement.clientWidth - this.options.momentumLimitDistance || u < this.options.momentumLimitDistance || f < this.options.momentumLimitDistance || f > document.documentElement.clientHeight - this.options.momentumLimitDistance) && this._end(e)
  447. }
  448. }
  449. }
  450. }, {
  451. key: "_end",
  452. value: function(e) {
  453. if (this.enabled && a.eventType[e.type] === this.initiated && (this.initiated = !1, this.options.preventDefault && !(0, a.preventDefaultException)(e.target, this.options.preventDefaultException) && e.preventDefault(), this.trigger("touchend", {
  454. x: this.x,
  455. y: this.y
  456. }), !this.resetPosition(this.options.bounceTime, a.ease.bounce))) {
  457. this.isInTransition = !1;
  458. var t = Math.round(this.x),
  459. i = Math.round(this.y);
  460. if (!this.moved) {
  461. if (this.options.wheel) {
  462. if (this.target && "wheel-scroll" === this.target.className) {
  463. var n = Math.abs(Math.round(i / this.itemHeight)),
  464. r = Math.round((this.pointY + (0, a.offset)(this.target).top - this.itemHeight / 2) / this.itemHeight);
  465. this.target = this.items[n + r]
  466. }
  467. this.scrollToElement(this.target, this.options.adjustTime, !0, !0, a.ease.swipe)
  468. } else this.options.tap && (0, a.tap)(e, this.options.tap), this.options.click && (0, a.click)(e);
  469. return void this.trigger("scrollCancel")
  470. }
  471. this.scrollTo(t, i), this.endTime = +new Date;
  472. var o = this.endTime - this.startTime,
  473. s = Math.abs(t - this.startX),
  474. l = Math.abs(i - this.startY);
  475. if (this._events.flick && o < this.options.momentumLimitTime && s < this.options.momentumLimitDistance && l < this.options.momentumLimitDistance) return void this.trigger("flick");
  476. var h = 0;
  477. if (this.options.momentum && o < this.options.momentumLimitTime && (l > this.options.momentumLimitDistance || s > this.options.momentumLimitDistance)) {
  478. var c = this.hasHorizontalScroll ? (0, a.momentum)(this.x, this.startX, o, this.maxScrollX, this.options.bounce ? this.wrapperWidth : 0, this.options) : {
  479. destination: t,
  480. duration: 0
  481. },
  482. p = this.hasVerticalScroll ? (0, a.momentum)(this.y, this.startY, o, this.maxScrollY, this.options.bounce ? this.wrapperHeight : 0, this.options) : {
  483. destination: i,
  484. duration: 0
  485. };
  486. t = c.destination, i = p.destination, h = Math.max(c.duration, p.duration), this.isInTransition = 1
  487. } else this.options.wheel && (i = Math.round(i / this.itemHeight) * this.itemHeight, h = this.options.adjustTime);
  488. var u = a.ease.swipe;
  489. if (this.options.snap) {
  490. var f = this._nearestSnap(t, i);
  491. this.currentPage = f, h = this.options.snapSpeed || Math.max(Math.max(Math.min(Math.abs(t - f.x), 1e3), Math.min(Math.abs(i - f.y), 1e3)), 300), t = f.x, i = f.y, this.directionX = 0, this.directionY = 0, u = a.ease.bounce
  492. }
  493. if (t !== this.x || i !== this.y) return (t > 0 || t < this.maxScrollX || i > 0 || i < this.maxScrollY) && (u = a.ease.swipeBounce), void this.scrollTo(t, i, h, u);
  494. this.options.wheel && (this.selectedIndex = 0 | Math.abs(this.y / this.itemHeight)), this.trigger("scrollEnd")
  495. }
  496. }
  497. }, {
  498. key: "_resize",
  499. value: function() {
  500. var e = this;
  501. this.enabled && (clearTimeout(this.resizeTimeout), this.resizeTimeout = setTimeout(function() {
  502. e.refresh()
  503. }, this.options.resizePolling))
  504. }
  505. }, {
  506. key: "_startProbe",
  507. value: function() {
  508. function e() {
  509. var i = t.getComputedPosition();
  510. t.trigger("scroll", i), t.isInTransition && (t.probeTimer = (0, a.requestAnimationFrame)(e))
  511. }(0, a.cancelAnimationFrame)(this.probeTimer), this.probeTimer = (0, a.requestAnimationFrame)(e);
  512. var t = this
  513. }
  514. }, {
  515. key: "_transitionTime",
  516. value: function() {
  517. var e = this,
  518. t = arguments.length <= 0 || void 0 === arguments[0] ? 0 : arguments[0];
  519. if (this.scrollerStyle[a.style.transitionDuration] = t + "ms", this.options.wheel && !a.isBadAndroid) for (var i = 0; i < this.items.length; i++) this.items[i].style[a.style.transitionDuration] = t + "ms";
  520. !t && a.isBadAndroid && (this.scrollerStyle[a.style.transitionDuration] = "0.001s", (0, a.requestAnimationFrame)(function() {
  521. "0.0001ms" === e.scrollerStyle[a.style.transitionDuration] && (e.scrollerStyle[a.style.transitionDuration] = "0s")
  522. }))
  523. }
  524. }, {
  525. key: "_transitionTimingFunction",
  526. value: function(e) {
  527. if (this.scrollerStyle[a.style.transitionTimingFunction] = e, this.options.wheel && !a.isBadAndroid) for (var t = 0; t < this.items.length; t++) this.items[t].style[a.style.transitionTimingFunction] = e
  528. }
  529. }, {
  530. key: "_transitionEnd",
  531. value: function(e) {
  532. e.target === this.scroller && this.isInTransition && (this._transitionTime(), this.resetPosition(this.options.bounceTime, a.ease.bounce) || (this.isInTransition = !1, this.trigger("scrollEnd")))
  533. }
  534. }, {
  535. key: "_translate",
  536. value: function(e, t) {
  537. if (this.options.useTransform ? this.scrollerStyle[a.style.transform] = "translate(" + e + "px," + t + "px)" + this.translateZ : (e = Math.round(e), t = Math.round(t), this.scrollerStyle.left = e + "px", this.scrollerStyle.top = t + "px"), this.options.wheel && !a.isBadAndroid) for (var i = 0; i < this.items.length; i++) {
  538. var n = this.options.rotate * (t / this.itemHeight + i);
  539. this.items[i].style[a.style.transform] = "rotateX(" + n + "deg)"
  540. }
  541. this.x = e, this.y = t
  542. }
  543. }, {
  544. key: "enable",
  545. value: function() {
  546. this.enabled = !0
  547. }
  548. }, {
  549. key: "disable",
  550. value: function() {
  551. this.enabled = !1
  552. }
  553. }, {
  554. key: "refresh",
  555. value: function() {
  556. this.wrapper.offsetHeight;
  557. this.wrapperWidth = parseInt(this.wrapper.style.width) || this.wrapper.clientWidth, this.wrapperHeight = parseInt(this.wrapper.style.height) || this.wrapper.clientHeight, this.scrollerWidth = parseInt(this.scroller.style.width) || this.scroller.clientWidth, this.scrollerHeight = parseInt(this.scroller.style.height) || this.scroller.clientHeight, this.options.wheel ? (this.items = this.scroller.children, this.options.itemHeight = this.itemHeight = this.items.length ? this.items[0].clientHeight : 0, void 0 === this.selectedIndex && (this.selectedIndex = this.options.selectedIndex), this.options.startY = -this.selectedIndex * this.itemHeight, this.maxScrollX = 0, this.maxScrollY = -this.itemHeight * (this.items.length - 1)) : (this.maxScrollX = this.wrapperWidth - this.scrollerWidth, this.maxScrollY = this.wrapperHeight - this.scrollerHeight), this.hasHorizontalScroll = this.options.scrollX && this.maxScrollX < 0, this.hasVerticalScroll = this.options.scrollY && this.maxScrollY < 0, this.hasHorizontalScroll || (this.maxScrollX = 0, this.scrollerWidth = this.wrapperWidth), this.hasVerticalScroll || (this.maxScrollY = 0, this.scrollerHeight = this.wrapperHeight), this.endTime = 0, this.directionX = 0, this.directionY = 0, this.wrapperOffset = (0, a.offset)(this.wrapper), this.trigger("refresh"), this.resetPosition()
  558. }
  559. }, {
  560. key: "resetPosition",
  561. value: function() {
  562. var e = arguments.length <= 0 || void 0 === arguments[0] ? 0 : arguments[0],
  563. t = arguments.length <= 1 || void 0 === arguments[1] ? a.ease.bounce : arguments[1],
  564. i = this.x;
  565. !this.hasHorizontalScroll || i > 0 ? i = 0 : i < this.maxScrollX && (i = this.maxScrollX);
  566. var n = this.y;
  567. return !this.hasVerticalScroll || n > 0 ? n = 0 : n < this.maxScrollY && (n = this.maxScrollY), (i !== this.x || n !== this.y) && (this.scrollTo(i, n, e, t), !0)
  568. }
  569. }, {
  570. key: "wheelTo",
  571. value: function(e) {
  572. this.options.wheel && (this.y = -e * this.itemHeight, this.scrollTo(0, this.y))
  573. }
  574. }, {
  575. key: "scrollBy",
  576. value: function(e, t) {
  577. var i = arguments.length <= 2 || void 0 === arguments[2] ? 0 : arguments[2],
  578. n = arguments.length <= 3 || void 0 === arguments[3] ? a.ease.bounce : arguments[3];
  579. e = this.x + e, t = this.y + t, this.scrollTo(e, t, i, n)
  580. }
  581. }, {
  582. key: "scrollTo",
  583. value: function(e, t, i) {
  584. var n = arguments.length <= 3 || void 0 === arguments[3] ? a.ease.bounce : arguments[3];
  585. this.isInTransition = this.options.useTransition && i > 0 && (e !== this.x || t !== this.y), i && !this.options.useTransition || (this._transitionTimingFunction(n.style), this._transitionTime(i), this._translate(e, t), i && 3 === this.options.probeType && this._startProbe(), this.options.wheel && (t > 0 ? this.selectedIndex = 0 : t < this.maxScrollY ? this.selectedIndex = this.items.length - 1 : this.selectedIndex = 0 | Math.abs(t / this.itemHeight)))
  586. }
  587. }, {
  588. key: "getSelectedIndex",
  589. value: function() {
  590. return this.options.wheel && this.selectedIndex
  591. }
  592. }, {
  593. key: "getCurrentPage",
  594. value: function() {
  595. return this.options.snap && this.currentPage
  596. }
  597. }, {
  598. key: "scrollToElement",
  599. value: function(e, t, i, n, r) {
  600. if (e && (e = e.nodeType ? e : this.scroller.querySelector(e), !this.options.wheel || "wheel-item" === e.className)) {
  601. var o = (0, a.offset)(e);
  602. o.left -= this.wrapperOffset.left, o.top -= this.wrapperOffset.top, i === !0 && (i = Math.round(e.offsetWidth / 2 - this.wrapper.offsetWidth / 2)), n === !0 && (n = Math.round(e.offsetHeight / 2 - this.wrapper.offsetHeight / 2)), o.left -= i || 0, o.top -= n || 0, o.left = o.left > 0 ? 0 : o.left < this.maxScrollX ? this.maxScrollX : o.left, o.top = o.top > 0 ? 0 : o.top < this.maxScrollY ? this.maxScrollY : o.top, this.options.wheel && (o.top = Math.round(o.top / this.itemHeight) * this.itemHeight), t = void 0 === t || null === t || "auto" === t ? Math.max(Math.abs(this.x - o.left), Math.abs(this.y - o.top)) : t, this.scrollTo(o.left, o.top, t, r)
  603. }
  604. }
  605. }, {
  606. key: "getComputedPosition",
  607. value: function() {
  608. var e = window.getComputedStyle(this.scroller, null),
  609. t = void 0,
  610. i = void 0;
  611. return this.options.useTransform ? (e = e[a.style.transform].split(")")[0].split(", "), t = +(e[12] || e[4]), i = +(e[13] || e[5])) : (t = +e.left.replace(/[^-\d.]/g, ""), i = +e.top.replace(/[^-\d.]/g, "")), {
  612. x: t,
  613. y: i
  614. }
  615. }
  616. }, {
  617. key: "goToPage",
  618. value: function(e, t, i) {
  619. var n = arguments.length <= 3 || void 0 === arguments[3] ? a.ease.bounce : arguments[3];
  620. e >= this.pages.length ? e = this.pages.length - 1 : e < 0 && (e = 0), t >= this.pages[e].length ? t = this.pages[e].length - 1 : t < 0 && (t = 0);
  621. var r = this.pages[e][t].x,
  622. o = this.pages[e][t].y;
  623. i = void 0 === i ? this.options.snapSpeed || Math.max(Math.max(Math.min(Math.abs(r - this.x), 1e3), Math.min(Math.abs(o - this.y), 1e3)), 300) : i, this.currentPage = {
  624. x: r,
  625. y: o,
  626. pageX: e,
  627. pageY: t
  628. }, this.scrollTo(r, o, i, n)
  629. }
  630. }, {
  631. key: "next",
  632. value: function(e, t) {
  633. var i = this.currentPage.pageX,
  634. n = this.currentPage.pageY;
  635. i++, i >= this.pages.length && this.hasVerticalScroll && (i = 0, n++), this.goToPage(i, n, e, t)
  636. }
  637. }, {
  638. key: "prev",
  639. value: function(e, t) {
  640. var i = this.currentPage.pageX,
  641. n = this.currentPage.pageY;
  642. i--, i < 0 && this.hasVerticalScroll && (i = 0, n--), this.goToPage(i, n, e, t)
  643. }
  644. }, {
  645. key: "destroy",
  646. value: function() {
  647. this._removeEvents(), this.trigger("destroy")
  648. }
  649. }, {
  650. key: "handleEvent",
  651. value: function(e) {
  652. switch (e.type) {
  653. case "touchstart":
  654. case "mousedown":
  655. this._start(e);
  656. break;
  657. case "touchmove":
  658. case "mousemove":
  659. this._move(e);
  660. break;
  661. case "touchend":
  662. case "mouseup":
  663. case "touchcancel":
  664. case "mousecancel":
  665. this._end(e);
  666. break;
  667. case "orientationchange":
  668. case "resize":
  669. this._resize();
  670. break;
  671. case "transitionend":
  672. case "webkitTransitionEnd":
  673. case "oTransitionEnd":
  674. case "MSTransitionEnd":
  675. this._transitionEnd(e);
  676. break;
  677. case "click":
  678. !this.enabled || e._constructed || /(SELECT|INPUT|TEXTAREA)/i.test(e.target.tagName) || (e.preventDefault(), e.stopPropagation())
  679. }
  680. }
  681. }]), t
  682. }(a.EventEmitter)
  683. }, function(e, t, i) {
  684. "use strict";
  685. Object.defineProperty(t, "__esModule", {
  686. value: !0
  687. });
  688. var n = i(3);
  689. Object.keys(n).forEach(function(e) {
  690. "default" !== e && "__esModule" !== e && Object.defineProperty(t, e, {
  691. enumerable: !0,
  692. get: function() {
  693. return n[e]
  694. }
  695. })
  696. });
  697. var r = i(4);
  698. Object.keys(r).forEach(function(e) {
  699. "default" !== e && "__esModule" !== e && Object.defineProperty(t, e, {
  700. enumerable: !0,
  701. get: function() {
  702. return r[e]
  703. }
  704. })
  705. });
  706. var o = i(5);
  707. Object.keys(o).forEach(function(e) {
  708. "default" !== e && "__esModule" !== e && Object.defineProperty(t, e, {
  709. enumerable: !0,
  710. get: function() {
  711. return o[e]
  712. }
  713. })
  714. });
  715. var s = i(6);
  716. Object.keys(s).forEach(function(e) {
  717. "default" !== e && "__esModule" !== e && Object.defineProperty(t, e, {
  718. enumerable: !0,
  719. get: function() {
  720. return s[e]
  721. }
  722. })
  723. });
  724. var a = i(7);
  725. Object.keys(a).forEach(function(e) {
  726. "default" !== e && "__esModule" !== e && Object.defineProperty(t, e, {
  727. enumerable: !0,
  728. get: function() {
  729. return a[e]
  730. }
  731. })
  732. });
  733. var l = i(8);
  734. Object.keys(l).forEach(function(e) {
  735. "default" !== e && "__esModule" !== e && Object.defineProperty(t, e, {
  736. enumerable: !0,
  737. get: function() {
  738. return l[e]
  739. }
  740. })
  741. })
  742. }, function(e, t) {
  743. "use strict";
  744. function i(e) {
  745. return f !== !1 && ("standard" === f ? e : f + e.charAt(0).toUpperCase() + e.substr(1))
  746. }
  747. function n(e, t, i, n) {
  748. e.addEventListener(t, i, {
  749. passive: !1,
  750. capture: !! n
  751. })
  752. }
  753. function r(e, t, i, n) {
  754. e.removeEventListener(t, i, !! n)
  755. }
  756. function o(e) {
  757. for (var t = 0, i = 0; e;) t -= e.offsetLeft, i -= e.offsetTop, e = e.offsetParent;
  758. return {
  759. left: t,
  760. top: i
  761. }
  762. }
  763. function s(e) {
  764. if (e instanceof window.SVGElement) {
  765. var t = e.getBoundingClientRect();
  766. return {
  767. top: t.top,
  768. left: t.left,
  769. width: t.width,
  770. height: t.height
  771. }
  772. }
  773. return {
  774. top: e.offsetTop,
  775. left: e.offsetLeft,
  776. width: e.offsetWidth,
  777. height: e.offsetHeight
  778. }
  779. }
  780. function a(e, t) {
  781. for (var i in t) if (t[i].test(e[i])) return !0;
  782. return !1
  783. }
  784. function l(e, t) {
  785. var i = document.createEvent("Event");
  786. i.initEvent(t, !0, !0), i.pageX = e.pageX, i.pageY = e.pageY, e.target.dispatchEvent(i)
  787. }
  788. function h(e) {
  789. var t = e.target;
  790. if (!/(SELECT|INPUT|TEXTAREA)/i.test(t.tagName)) {
  791. var i = document.createEvent(window.MouseEvent ? "MouseEvents" : "Event");
  792. i.initEvent("click", !0, !0), i._constructed = !0, t.dispatchEvent(i)
  793. }
  794. }
  795. function c(e, t) {
  796. t.firstChild ? p(e, t.firstChild) : t.appendChild(e)
  797. }
  798. function p(e, t) {
  799. t.parentNode.insertBefore(e, t)
  800. }
  801. Object.defineProperty(t, "__esModule", {
  802. value: !0
  803. }), t.addEvent = n, t.removeEvent = r, t.offset = o, t.getRect = s, t.preventDefaultException = a, t.tap = l, t.click = h, t.prepend = c, t.before = p;
  804. var u = document.createElement("div").style,
  805. f = function() {
  806. var e = {
  807. webkit: "webkitTransform",
  808. Moz: "MozTransform",
  809. O: "OTransform",
  810. ms: "msTransform",
  811. standard: "transform"
  812. };
  813. for (var t in e) if (void 0 !== u[e[t]]) return t;
  814. return !1
  815. }(),
  816. d = i("transform"),
  817. m = (t.hasPerspective = i("perspective") in u, t.hasTouch = "ontouchstart" in window, t.hasTransform = d !== !1, t.hasTransition = i("transition") in u, t.style = {
  818. transform: d,
  819. transitionTimingFunction: i("transitionTimingFunction"),
  820. transitionDuration: i("transitionDuration"),
  821. transitionDelay: i("transitionDelay"),
  822. transformOrigin: i("transformOrigin"),
  823. transitionEnd: i("transitionEnd")
  824. }, 1),
  825. v = 2;
  826. t.eventType = {
  827. touchstart: m,
  828. touchmove: m,
  829. touchend: m,
  830. mousedown: v,
  831. mousemove: v,
  832. mouseup: v
  833. }
  834. }, function(e, t) {
  835. "use strict";
  836. Object.defineProperty(t, "__esModule", {
  837. value: !0
  838. });
  839. t.isBadAndroid = /Android /.test(window.navigator.appVersion) && !/Chrome\/\d/.test(window.navigator.appVersion)
  840. }, function(e, t) {
  841. "use strict";
  842. Object.defineProperty(t, "__esModule", {
  843. value: !0
  844. });
  845. t.ease = {
  846. swipe: {
  847. style: "cubic-bezier(0.23, 1, 0.32, 1)",
  848. fn: function(e) {
  849. return 1 + --e * e * e * e * e
  850. }
  851. },
  852. swipeBounce: {
  853. style: "cubic-bezier(0.25, 0.46, 0.45, 0.94)",
  854. fn: function(e) {
  855. return e * (2 - e)
  856. }
  857. },
  858. bounce: {
  859. style: "cubic-bezier(0.165, 0.84, 0.44, 1)",
  860. fn: function(e) {
  861. return 1 - --e * e * e * e
  862. }
  863. }
  864. }
  865. }, function(e, t) {
  866. "use strict";
  867. function i(e) {
  868. if (Array.isArray(e)) {
  869. for (var t = 0, i = Array(e.length); t < e.length; t++) i[t] = e[t];
  870. return i
  871. }
  872. return Array.from(e)
  873. }
  874. function n(e, t) {
  875. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  876. }
  877. Object.defineProperty(t, "__esModule", {
  878. value: !0
  879. });
  880. var r = function() {
  881. function e(e, t) {
  882. var i = [],
  883. n = !0,
  884. r = !1,
  885. o = void 0;
  886. try {
  887. for (var s, a = e[Symbol.iterator](); !(n = (s = a.next()).done) && (i.push(s.value), !t || i.length !== t); n = !0);
  888. } catch (e) {
  889. r = !0, o = e
  890. } finally {
  891. try {
  892. !n && a.
  893. return &&a.
  894. return ()
  895. } finally {
  896. if (r) throw o
  897. }
  898. }
  899. return i
  900. }
  901. return function(t, i) {
  902. if (Array.isArray(t)) return t;
  903. if (Symbol.iterator in Object(t)) return e(t, i);
  904. throw new TypeError("Invalid attempt to destructure non-iterable instance")
  905. }
  906. }(),
  907. o = function() {
  908. function e(e, t) {
  909. for (var i = 0; i < t.length; i++) {
  910. var n = t[i];
  911. n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
  912. }
  913. }
  914. return function(t, i, n) {
  915. return i && e(t.prototype, i), n && e(t, n), t
  916. }
  917. }();
  918. t.EventEmitter = function() {
  919. function e() {
  920. n(this, e), this._events = {}
  921. }
  922. return o(e, [{
  923. key: "on",
  924. value: function(e, t) {
  925. var i = arguments.length <= 2 || void 0 === arguments[2] ? this : arguments[2];
  926. this._events[e] || (this._events[e] = []), this._events[e].push([t, i])
  927. }
  928. }, {
  929. key: "once",
  930. value: function(e, t) {
  931. function i() {
  932. this.off(e, i), r || (r = !0, t.apply(n, arguments))
  933. }
  934. var n = arguments.length <= 2 || void 0 === arguments[2] ? this : arguments[2],
  935. r = !1;
  936. this.on(e, i)
  937. }
  938. }, {
  939. key: "off",
  940. value: function(e, t) {
  941. var i = this._events[e];
  942. if (i) for (var n = i.length; n--;) i[n][0] === t && (i[n][0] = void 0)
  943. }
  944. }, {
  945. key: "trigger",
  946. value: function(e) {
  947. var t = this._events[e];
  948. if (t) for (var n = t.length, o = [].concat(i(t)), s = 0; s < n; s++) {
  949. var a = o[s],
  950. l = r(a, 2),
  951. h = l[0],
  952. c = l[1];
  953. h && h.apply(c, [].slice.call(arguments, 1))
  954. }
  955. }
  956. }]), e
  957. }()
  958. }, function(e, t) {
  959. "use strict";
  960. function i(e, t, i, n, r, o) {
  961. var s = e - t,
  962. a = Math.abs(s) / i,
  963. l = o.deceleration,
  964. h = o.itemHeight,
  965. c = o.swipeBounceTime,
  966. p = o.bounceTime,
  967. u = o.swipeTime,
  968. f = o.wheel ? 4 : 15,
  969. d = e + a / l * (s < 0 ? -1 : 1);
  970. return o.wheel && h && (d = Math.round(d / h) * h), d < n ? (d = r ? n - r / f * a : n, u = c - p) : d > 0 && (d = r ? r / f * a : 0, u = c - p), {
  971. destination: Math.round(d),
  972. duration: u
  973. }
  974. }
  975. Object.defineProperty(t, "__esModule", {
  976. value: !0
  977. }), t.momentum = i
  978. }, function(e, t) {
  979. "use strict";
  980. function i(e, t) {
  981. for (var i in t) e[i] = t[i]
  982. }
  983. Object.defineProperty(t, "__esModule", {
  984. value: !0
  985. }), t.extend = i;
  986. var n = 100 / 60;
  987. t.requestAnimationFrame = function() {
  988. return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame ||
  989. function(e) {
  990. return window.setTimeout(e, (e.interval || n) / 2)
  991. }
  992. }(), t.cancelAnimationFrame = function() {
  993. return window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame ||
  994. function(e) {
  995. window.clearTimeout(e)
  996. }
  997. }()
  998. }])
  999. })
  1000. }, function(e, t) {
  1001. "use strict";
  1002. function i(e) {
  1003. if (Array.isArray(e)) {
  1004. for (var t = 0, i = Array(e.length); t < e.length; t++) i[t] = e[t];
  1005. return i
  1006. }
  1007. return Array.from(e)
  1008. }
  1009. function n(e, t) {
  1010. if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
  1011. }
  1012. t.__esModule = !0;
  1013. var r = function() {
  1014. function e(e, t) {
  1015. var i = [],
  1016. n = !0,
  1017. r = !1,
  1018. o = void 0;
  1019. try {
  1020. for (var s, a = e[Symbol.iterator](); !(n = (s = a.next()).done) && (i.push(s.value), !t || i.length !== t); n = !0);
  1021. } catch (e) {
  1022. r = !0, o = e
  1023. } finally {
  1024. try {
  1025. !n && a.
  1026. return &&a.
  1027. return ()
  1028. } finally {
  1029. if (r) throw o
  1030. }
  1031. }
  1032. return i
  1033. }
  1034. return function(t, i) {
  1035. if (Array.isArray(t)) return t;
  1036. if (Symbol.iterator in Object(t)) return e(t, i);
  1037. throw new TypeError("Invalid attempt to destructure non-iterable instance")
  1038. }
  1039. }(),
  1040. o = function() {
  1041. function e(e, t) {
  1042. for (var i = 0; i < t.length; i++) {
  1043. var n = t[i];
  1044. n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n)
  1045. }
  1046. }
  1047. return function(t, i, n) {
  1048. return i && e(t.prototype, i), n && e(t, n), t
  1049. }
  1050. }(),
  1051. s = function() {
  1052. function e() {
  1053. n(this, e), this._events = {}
  1054. }
  1055. return o(e, [{
  1056. key: "on",
  1057. value: function(e, t) {
  1058. var i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : this;
  1059. this._events[e] || (this._events[e] = []), this._events[e].push([t, i])
  1060. }
  1061. }, {
  1062. key: "once",
  1063. value: function(e, t) {
  1064. function i() {
  1065. this.off(e, i), r || (r = !0, t.apply(n, arguments))
  1066. }
  1067. var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : this,
  1068. r = !1;
  1069. this.on(e, i)
  1070. }
  1071. }, {
  1072. key: "off",
  1073. value: function(e, t) {
  1074. var i = this._events[e];
  1075. if (i) for (var n = i.length; n--;) i[n][0] === t && (i[n][0] = void 0)
  1076. }
  1077. }, {
  1078. key: "trigger",
  1079. value: function(e) {
  1080. var t = this._events[e];
  1081. if (t) for (var n = t.length, o = [].concat(i(t)), s = 0; s < n; s++) {
  1082. var a = o[s],
  1083. l = r(a, 2),
  1084. h = l[0],
  1085. c = l[1];
  1086. h && h.apply(c, [].slice.call(arguments, 1))
  1087. }
  1088. }
  1089. }]), e
  1090. }();
  1091. t.
  1092. default = s, e.exports = t.
  1093. default
  1094. }, function(e, t) {
  1095. "use strict";
  1096. function i(e, t) {
  1097. for (var i in t) e[i] = t[i]
  1098. }
  1099. t.__esModule = !0, t.extend = i
  1100. }, function(e, t) {
  1101. "use strict";
  1102. function i(e) {
  1103. var t = document.createElement("div");
  1104. return t.innerHTML = e, t.childNodes[0]
  1105. }
  1106. function n(e, t, i, n) {
  1107. e.addEventListener(t, i, !! n)
  1108. }
  1109. function r(e, t, i, n) {
  1110. e.removeEventListener(t, i, !! n)
  1111. }
  1112. function o(e, t) {
  1113. var i = new RegExp("(^|\\s)" + t + "(\\s|$)");
  1114. return i.test(e.className)
  1115. }
  1116. function s(e, t) {
  1117. if (!o(e, t)) {
  1118. var i = e.className.split(" ");
  1119. i.push(t), e.className = i.join(" ")
  1120. }
  1121. }
  1122. function a(e, t) {
  1123. if (o(e, t)) {
  1124. var i = new RegExp("(^|\\s)" + t + "(\\s|$)", "g");
  1125. e.className = e.className.replace(i, " ")
  1126. }
  1127. }
  1128. t.__esModule = !0, t.createDom = i, t.addEvent = n, t.removeEvent = r, t.hasClass = o, t.addClass = s, t.removeClass = a
  1129. }, function(e, t, i) {
  1130. var n = i(7);
  1131. e.exports = (n.
  1132. default ||n).template(function(e, t, i, n, r) {
  1133. function o(e, t) {
  1134. var n, r = "";
  1135. return r += '\n <div class="wheel wheel-hook">\n <ul class="wheel-scroll wheel-scroll-hook">\n ', n = i.each.call(e, e, {
  1136. hash: {},
  1137. inverse: u.noop,
  1138. fn: u.program(2, s, t),
  1139. data: t
  1140. }), (n || 0 === n) && (r += n), r += "\n </ul>\n </div>\n "
  1141. }
  1142. function s(e, t) {
  1143. var n, r, o = "";
  1144. return o += '\n <li class="wheel-item" data-val="', (r = i.value) ? n = r.call(e, {
  1145. hash: {},
  1146. data: t
  1147. }) : (r = e && e.value, n = typeof r === c ? r.call(e, {
  1148. hash: {},
  1149. data: t
  1150. }) : r), o += p(n) + '">', (r = i.text) ? n = r.call(e, {
  1151. hash: {},
  1152. data: t
  1153. }) : (r = e && e.text, n = typeof r === c ? r.call(e, {
  1154. hash: {},
  1155. data: t
  1156. }) : r), o += p(n) + "</li>\n "
  1157. }
  1158. this.compilerInfo = [4, ">= 1.0.0"], i = this.merge(i, e.helpers), r = r || {};
  1159. var a, l, h = "",
  1160. c = "function",
  1161. p = this.escapeExpression,
  1162. u = this;
  1163. return h += '<div class="picker">\n <div class="picker-mask mask-hook"></div>\n <div class="picker-panel panel-hook">\n <div class="picker-choose choose-hook">\n <span class="cancel cancel-hook">取消</span>\n <span class="confirm confirm-hook">确定</span>\n <h1 class="picker-title">', (l = i.title) ? a = l.call(t, {
  1164. hash: {},
  1165. data: r
  1166. }) : (l = t && t.title, a = typeof l === c ? l.call(t, {
  1167. hash: {},
  1168. data: r
  1169. }) : l), h += p(a) + '</h1>\n </div>\n <div class="picker-content">\n <div class="mask-top border-1px"></div>\n <div class="mask-bottom border-1px"></div>\n <div class="wheel-wrapper wheel-wrapper-hook">\n ', a = i.each.call(t, t && t.data, {
  1170. hash: {},
  1171. inverse: u.noop,
  1172. fn: u.program(1, o, r),
  1173. data: r
  1174. }), (a || 0 === a) && (h += a), h += '\n </div>\n </div>\n <div class="picker-footer footer-hook"></div>\n </div>\n</div>'
  1175. })
  1176. }, function(e, t, i) {
  1177. e.exports = i(8)
  1178. }, function(e, t, i) {
  1179. "use strict";
  1180. var n = i(9),
  1181. r = i(11).
  1182. default,
  1183. o = i(12).
  1184. default,
  1185. s = i(10),
  1186. a = i(13),
  1187. l = function() {
  1188. var e = new n.HandlebarsEnvironment;
  1189. return s.extend(e, n), e.SafeString = r, e.Exception = o, e.Utils = s, e.VM = a, e.template = function(t) {
  1190. return a.template(t, e)
  1191. }, e
  1192. },
  1193. h = l();
  1194. h.create = l, t.
  1195. default = h
  1196. }, function(e, t, i) {
  1197. "use strict";
  1198. function n(e, t) {
  1199. this.helpers = e || {}, this.partials = t || {}, r(this)
  1200. }
  1201. function r(e) {
  1202. e.registerHelper("helperMissing", function(e) {
  1203. if (2 !== arguments.length) throw new a("Missing helper: '" + e + "'")
  1204. }), e.registerHelper("blockHelperMissing", function(t, i) {
  1205. var n = i.inverse ||
  1206. function() {}, r = i.fn;
  1207. return u(t) && (t = t.call(this)), t === !0 ? r(this) : t === !1 || null == t ? n(this) : p(t) ? t.length > 0 ? e.helpers.each(t, i) : n(this) : r(t)
  1208. }), e.registerHelper("each", function(e, t) {
  1209. var i, n = t.fn,
  1210. r = t.inverse,
  1211. o = 0,
  1212. s = "";
  1213. if (u(e) && (e = e.call(this)), t.data && (i = v(t.data)), e && "object" == typeof e) if (p(e)) for (var a = e.length; o < a; o++) i && (i.index = o, i.first = 0 === o, i.last = o === e.length - 1), s += n(e[o], {
  1214. data: i
  1215. });
  1216. else for (var l in e) e.hasOwnProperty(l) && (i && (i.key = l, i.index = o, i.first = 0 === o), s += n(e[l], {
  1217. data: i
  1218. }), o++);
  1219. return 0 === o && (s = r(this)), s
  1220. }), e.registerHelper("if", function(e, t) {
  1221. return u(e) && (e = e.call(this)), !t.hash.includeZero && !e || s.isEmpty(e) ? t.inverse(this) : t.fn(this)
  1222. }), e.registerHelper("unless", function(t, i) {
  1223. return e.helpers.
  1224. if.call(this, t, {
  1225. fn: i.inverse,
  1226. inverse: i.fn,
  1227. hash: i.hash
  1228. })
  1229. }), e.registerHelper("with", function(e, t) {
  1230. if (u(e) && (e = e.call(this)), !s.isEmpty(e)) return t.fn(e)
  1231. }), e.registerHelper("log", function(t, i) {
  1232. var n = i.data && null != i.data.level ? parseInt(i.data.level, 10) : 1;
  1233. e.log(n, t)
  1234. })
  1235. }
  1236. function o(e, t) {
  1237. m.log(e, t)
  1238. }
  1239. var s = i(10),
  1240. a = i(12).
  1241. default,
  1242. l = "1.3.0";
  1243. t.VERSION = l;
  1244. var h = 4;
  1245. t.COMPILER_REVISION = h;
  1246. var c = {
  1247. 1: "<= 1.0.rc.2",
  1248. 2: "== 1.0.0-rc.3",
  1249. 3: "== 1.0.0-rc.4",
  1250. 4: ">= 1.0.0"
  1251. };
  1252. t.REVISION_CHANGES = c;
  1253. var p = s.isArray,
  1254. u = s.isFunction,
  1255. f = s.toString,
  1256. d = "[object Object]";
  1257. t.HandlebarsEnvironment = n, n.prototype = {
  1258. constructor: n,
  1259. logger: m,
  1260. log: o,
  1261. registerHelper: function(e, t, i) {
  1262. if (f.call(e) === d) {
  1263. if (i || t) throw new a("Arg not supported with multiple helpers");
  1264. s.extend(this.helpers, e)
  1265. } else i && (t.not = i), this.helpers[e] = t
  1266. },
  1267. registerPartial: function(e, t) {
  1268. f.call(e) === d ? s.extend(this.partials, e) : this.partials[e] = t
  1269. }
  1270. };
  1271. var m = {
  1272. methodMap: {
  1273. 0: "debug",
  1274. 1: "info",
  1275. 2: "warn",
  1276. 3: "error"
  1277. },
  1278. DEBUG: 0,
  1279. INFO: 1,
  1280. WARN: 2,
  1281. ERROR: 3,
  1282. level: 3,
  1283. log: function(e, t) {
  1284. if (m.level <= e) {
  1285. var i = m.methodMap[e];
  1286. "undefined" != typeof console && console[i] && console[i].call(console, t)
  1287. }
  1288. }
  1289. };
  1290. t.logger = m, t.log = o;
  1291. var v = function(e) {
  1292. var t = {};
  1293. return s.extend(t, e), t
  1294. };
  1295. t.createFrame = v
  1296. }, function(e, t, i) {
  1297. "use strict";
  1298. function n(e) {
  1299. return l[e] || "&amp;"
  1300. }
  1301. function r(e, t) {
  1302. for (var i in t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i])
  1303. }
  1304. function o(e) {
  1305. return e instanceof a ? e.toString() : e || 0 === e ? (e = "" + e, c.test(e) ? e.replace(h, n) : e) : ""
  1306. }
  1307. function s(e) {
  1308. return !e && 0 !== e || !(!f(e) || 0 !== e.length)
  1309. }
  1310. var a = i(11).
  1311. default,
  1312. l = {
  1313. "&": "&amp;",
  1314. "<": "&lt;",
  1315. ">": "&gt;",
  1316. '"': "&quot;",
  1317. "'": "&#x27;",
  1318. "`": "&#x60;"
  1319. },
  1320. h = /[&<>"'`]/g,
  1321. c = /[&<>"'`]/;
  1322. t.extend = r;
  1323. var p = Object.prototype.toString;
  1324. t.toString = p;
  1325. var u = function(e) {
  1326. return "function" == typeof e
  1327. };
  1328. u(/x/) && (u = function(e) {
  1329. return "function" == typeof e && "[object Function]" === p.call(e)
  1330. });
  1331. var u;
  1332. t.isFunction = u;
  1333. var f = Array.isArray ||
  1334. function(e) {
  1335. return !(!e || "object" != typeof e) && "[object Array]" === p.call(e)
  1336. };
  1337. t.isArray = f, t.escapeExpression = o, t.isEmpty = s
  1338. }, function(e, t) {
  1339. "use strict";
  1340. function i(e) {
  1341. this.string = e
  1342. }
  1343. i.prototype.toString = function() {
  1344. return "" + this.string
  1345. }, t.
  1346. default = i
  1347. }, function(e, t) {
  1348. "use strict";
  1349. function i(e, t) {
  1350. var i;
  1351. t && t.firstLine && (i = t.firstLine, e += " - " + i + ":" + t.firstColumn);
  1352. for (var r = Error.prototype.constructor.call(this, e), o = 0; o < n.length; o++) this[n[o]] = r[n[o]];
  1353. i && (this.lineNumber = i, this.column = t.firstColumn)
  1354. }
  1355. var n = ["description", "fileName", "lineNumber", "message", "name", "number", "stack"];
  1356. i.prototype = new Error, t.
  1357. default = i
  1358. }, function(e, t, i) {
  1359. "use strict";
  1360. function n(e) {
  1361. var t = e && e[0] || 1,
  1362. i = p;
  1363. if (t !== i) {
  1364. if (t < i) {
  1365. var n = u[i],
  1366. r = u[t];
  1367. throw new c("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (" + n + ") or downgrade your runtime to an older version (" + r + ").")
  1368. }
  1369. throw new c("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (" + e[1] + ").")
  1370. }
  1371. }
  1372. function r(e, t) {
  1373. if (!t) throw new c("No environment passed to template");
  1374. var i = function(e, i, n, r, o, s) {
  1375. var a = t.VM.invokePartial.apply(this, arguments);
  1376. if (null != a) return a;
  1377. if (t.compile) {
  1378. var l = {
  1379. helpers: r,
  1380. partials: o,
  1381. data: s
  1382. };
  1383. return o[i] = t.compile(e, {
  1384. data: void 0 !== s
  1385. }, t), o[i](n, l)
  1386. }
  1387. throw new c("The partial " + i + " could not be compiled when running in runtime-only mode")
  1388. },
  1389. n = {
  1390. escapeExpression: h.escapeExpression,
  1391. invokePartial: i,
  1392. programs: [],
  1393. program: function(e, t, i) {
  1394. var n = this.programs[e];
  1395. return i ? n = s(e, t, i) : n || (n = this.programs[e] = s(e, t)), n
  1396. },
  1397. merge: function(e, t) {
  1398. var i = e || t;
  1399. return e && t && e !== t && (i = {}, h.extend(i, t), h.extend(i, e)), i
  1400. },
  1401. programWithDepth: t.VM.programWithDepth,
  1402. noop: t.VM.noop,
  1403. compilerInfo: null
  1404. };
  1405. return function(i, r) {
  1406. r = r || {};
  1407. var o, s, a = r.partial ? r : t;
  1408. r.partial || (o = r.helpers, s = r.partials);
  1409. var l = e.call(n, a, i, o, s, r.data);
  1410. return r.partial || t.VM.checkRevision(n.compilerInfo), l
  1411. }
  1412. }
  1413. function o(e, t, i) {
  1414. var n = Array.prototype.slice.call(arguments, 3),
  1415. r = function(e, r) {
  1416. return r = r || {}, t.apply(this, [e, r.data || i].concat(n))
  1417. };
  1418. return r.program = e, r.depth = n.length, r
  1419. }
  1420. function s(e, t, i) {
  1421. var n = function(e, n) {
  1422. return n = n || {}, t(e, n.data || i)
  1423. };
  1424. return n.program = e, n.depth = 0, n
  1425. }
  1426. function a(e, t, i, n, r, o) {
  1427. var s = {
  1428. partial: !0,
  1429. helpers: n,
  1430. partials: r,
  1431. data: o
  1432. };
  1433. if (void 0 === e) throw new c("The partial " + t + " could not be found");
  1434. if (e instanceof Function) return e(i, s)
  1435. }
  1436. function l() {
  1437. return ""
  1438. }
  1439. var h = i(10),
  1440. c = i(12).
  1441. default,
  1442. p = i(9).COMPILER_REVISION,
  1443. u = i(9).REVISION_CHANGES;
  1444. t.checkRevision = n, t.template = r, t.programWithDepth = o, t.program = s, t.invokePartial = a, t.noop = l
  1445. }, function(e, t, i) {
  1446. var n = i(7);
  1447. e.exports = (n.
  1448. default ||n).template(function(e, t, i, n, r) {
  1449. function o(e, t) {
  1450. var n, r, o = "";
  1451. return o += '\n <li class="wheel-item" data-val="', (r = i.value) ? n = r.call(e, {
  1452. hash: {},
  1453. data: t
  1454. }) : (r = e && e.value, n = typeof r === a ? r.call(e, {
  1455. hash: {},
  1456. data: t
  1457. }) : r), o += l(n) + '">', (r = i.text) ? n = r.call(e, {
  1458. hash: {},
  1459. data: t
  1460. }) : (r = e && e.text, n = typeof r === a ? r.call(e, {
  1461. hash: {},
  1462. data: t
  1463. }) : r), o += l(n) + "</li>\n"
  1464. }
  1465. this.compilerInfo = [4, ">= 1.0.0"], i = this.merge(i, e.helpers), r = r || {};
  1466. var s, a = "function",
  1467. l = this.escapeExpression,
  1468. h = this;
  1469. return s = i.each.call(t, t, {
  1470. hash: {},
  1471. inverse: h.noop,
  1472. fn: h.program(1, o, r),
  1473. data: r
  1474. }), s || 0 === s ? s : ""
  1475. })
  1476. }, function(e, t, i) {
  1477. var n = i(16);
  1478. "string" == typeof n && (n = [
  1479. [e.id, n, ""]
  1480. ]);
  1481. i(18)(n, {});
  1482. n.locals && (e.exports = n.locals)
  1483. }, function(e, t, i) {
  1484. t = e.exports = i(17)(), t.push([e.id, '.picker{display:none;position:fixed;top:0;z-index:100;width:100%;height:100%;overflow:hidden;text-align:center;font-family:PingFang SC,STHeitiSC-Light,Helvetica-Light,arial,sans-serif;font-size:14px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.picker .picker-mask{position:absolute;z-index:500;width:100%;height:100%;transition:all .5s;-webkit-transition:all .5s;background:transparent;opacity:0}.picker .picker-mask.show{background:rgba(0,0,0,.6);opacity:1}.picker .picker-panel{position:absolute;z-index:600;bottom:0;width:100%;height:243px;background:#fff;transform:translateY(243px);-webkit-transform:translateY(243px);transition:all .5s;-webkit-transition:all .5s}.picker .picker-panel.show{transform:translateY(0);-webkit-transform:translateY(0)}.picker .picker-panel .picker-choose{position:relative;height:50px;color:#878787;font-size:14px}.picker .picker-panel .picker-choose .picker-title{line-height:50px;font-size:19px;text-align:center;color:#333}.picker .picker-panel .picker-choose .cancel,.picker .picker-panel .picker-choose .confirm{position:absolute;padding:10px;top:6px}.picker .picker-panel .picker-choose .confirm{right:0;color:#17f377}.picker .picker-panel .picker-choose .cancel{left:0}.picker .picker-panel .picker-content{position:relative}.picker .picker-panel .picker-content .mask-bottom,.picker .picker-panel .picker-content .mask-top{position:absolute;z-index:10;width:100%;height:68px;pointer-events:none;transform:translateZ(0);-webkit-transform:translateZ(0)}.picker .picker-panel .picker-content .mask-top{top:0;background:-webkit-gradient(linear,left bottom,left top,from(hsla(0,0%,100%,.4)),to(hsla(0,0%,100%,.8)));background:-o-linear-gradient(bottom,hsla(0,0%,100%,.4),hsla(0,0%,100%,.8))}.picker .picker-panel .picker-content .mask-top:after,.picker .picker-panel .picker-content .mask-top:before{display:block;position:absolute;border-top:1px solid #ccc;left:0;width:100%;content:" "}.picker .picker-panel .picker-content .mask-top:before{display:none;top:0}.picker .picker-panel .picker-content .mask-top:after{display:block;bottom:0}.picker .picker-panel .picker-content .mask-bottom{bottom:0;background:-webkit-gradient(linear,left top,left bottom,from(hsla(0,0%,100%,.4)),to(hsla(0,0%,100%,.8)));background:-o-linear-gradient(top,hsla(0,0%,100%,.4),hsla(0,0%,100%,.8))}.picker .picker-panel .picker-content .mask-bottom:after,.picker .picker-panel .picker-content .mask-bottom:before{display:block;position:absolute;border-top:1px solid #ccc;left:0;width:100%;content:" "}.picker .picker-panel .picker-content .mask-bottom:before{display:block;top:0}.picker .picker-panel .picker-content .mask-bottom:after{display:none;bottom:0}.picker .picker-panel .wheel-wrapper{display:-ms-flexbox;display:-webkit-box;display:flex;padding:0 10px}.picker .picker-panel .wheel-wrapper .wheel{-ms-flex:1 1 1e-9px;-webkit-box-flex:1;flex:1;flex-basis:1e-9px;width:1%;height:173px;overflow:hidden;font-size:21px}.picker .picker-panel .wheel-wrapper .wheel .wheel-scroll{margin-top:68px;line-height:36px}.picker .picker-panel .wheel-wrapper .wheel .wheel-scroll .wheel-item{height:36px;overflow:hidden;white-space:nowrap;color:#333}.picker .picker-footer{height:20px}@media (-webkit-min-device-pixel-ratio:1.5),(min-device-pixel-ratio:1.5){.border-1px:after,.border-1px:before{-webkit-transform:scaleY(.7);-webkit-transform-origin:0 0;transform:scaleY(.7)}.border-1px:after{-webkit-transform-origin:left bottom}}@media (-webkit-min-device-pixel-ratio:2),(min-device-pixel-ratio:2){.border-1px:after,.border-1px:before{-webkit-transform:scaleY(.5);transform:scaleY(.5)}}', ""])
  1485. }, function(e, t) {
  1486. e.exports = function() {
  1487. var e = [];
  1488. return e.toString = function() {
  1489. for (var e = [], t = 0; t < this.length; t++) {
  1490. var i = this[t];
  1491. i[2] ? e.push("@media " + i[2] + "{" + i[1] + "}") : e.push(i[1])
  1492. }
  1493. return e.join("")
  1494. }, e.i = function(t, i) {
  1495. "string" == typeof t && (t = [
  1496. [null, t, ""]
  1497. ]);
  1498. for (var n = {}, r = 0; r < this.length; r++) {
  1499. var o = this[r][0];
  1500. "number" == typeof o && (n[o] = !0)
  1501. }
  1502. for (r = 0; r < t.length; r++) {
  1503. var s = t[r];
  1504. "number" == typeof s[0] && n[s[0]] || (i && !s[2] ? s[2] = i : i && (s[2] = "(" + s[2] + ") and (" + i + ")"), e.push(s))
  1505. }
  1506. }, e
  1507. }
  1508. }, function(e, t, i) {
  1509. function n(e, t) {
  1510. for (var i = 0; i < e.length; i++) {
  1511. var n = e[i],
  1512. r = f[n.id];
  1513. if (r) {
  1514. r.refs++;
  1515. for (var o = 0; o < r.parts.length; o++) r.parts[o](n.parts[o]);
  1516. for (; o < n.parts.length; o++) r.parts.push(h(n.parts[o], t))
  1517. } else {
  1518. for (var s = [], o = 0; o < n.parts.length; o++) s.push(h(n.parts[o], t));
  1519. f[n.id] = {
  1520. id: n.id,
  1521. refs: 1,
  1522. parts: s
  1523. }
  1524. }
  1525. }
  1526. }
  1527. function r(e) {
  1528. for (var t = [], i = {}, n = 0; n < e.length; n++) {
  1529. var r = e[n],
  1530. o = r[0],
  1531. s = r[1],
  1532. a = r[2],
  1533. l = r[3],
  1534. h = {
  1535. css: s,
  1536. media: a,
  1537. sourceMap: l
  1538. };
  1539. i[o] ? i[o].parts.push(h) : t.push(i[o] = {
  1540. id: o,
  1541. parts: [h]
  1542. })
  1543. }
  1544. return t
  1545. }
  1546. function o(e, t) {
  1547. var i = v(),
  1548. n = b[b.length - 1];
  1549. if ("top" === e.insertAt) n ? n.nextSibling ? i.insertBefore(t, n.nextSibling) : i.appendChild(t) : i.insertBefore(t, i.firstChild), b.push(t);
  1550. else {
  1551. if ("bottom" !== e.insertAt) throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
  1552. i.appendChild(t)
  1553. }
  1554. }
  1555. function s(e) {
  1556. e.parentNode.removeChild(e);
  1557. var t = b.indexOf(e);
  1558. t >= 0 && b.splice(t, 1)
  1559. }
  1560. function a(e) {
  1561. var t = document.createElement("style");
  1562. return t.type = "text/css", o(e, t), t
  1563. }
  1564. function l(e) {
  1565. var t = document.createElement("link");
  1566. return t.rel = "stylesheet", o(e, t), t
  1567. }
  1568. function h(e, t) {
  1569. var i, n, r;
  1570. if (t.singleton) {
  1571. var o = y++;
  1572. i = g || (g = a(t)), n = c.bind(null, i, o, !1), r = c.bind(null, i, o, !0)
  1573. } else e.sourceMap && "function" == typeof URL && "function" == typeof URL.createObjectURL && "function" == typeof URL.revokeObjectURL && "function" == typeof Blob && "function" == typeof btoa ? (i = l(t), n = u.bind(null, i), r = function() {
  1574. s(i), i.href && URL.revokeObjectURL(i.href)
  1575. }) : (i = a(t), n = p.bind(null, i), r = function() {
  1576. s(i)
  1577. });
  1578. return n(e), function(t) {
  1579. if (t) {
  1580. if (t.css === e.css && t.media === e.media && t.sourceMap === e.sourceMap) return;
  1581. n(e = t)
  1582. } else r()
  1583. }
  1584. }
  1585. function c(e, t, i, n) {
  1586. var r = i ? "" : n.css;
  1587. if (e.styleSheet) e.styleSheet.cssText = k(t, r);
  1588. else {
  1589. var o = document.createTextNode(r),
  1590. s = e.childNodes;
  1591. s[t] && e.removeChild(s[t]), s.length ? e.insertBefore(o, s[t]) : e.appendChild(o)
  1592. }
  1593. }
  1594. function p(e, t) {
  1595. var i = t.css,
  1596. n = t.media;
  1597. if (n && e.setAttribute("media", n), e.styleSheet) e.styleSheet.cssText = i;
  1598. else {
  1599. for (; e.firstChild;) e.removeChild(e.firstChild);
  1600. e.appendChild(document.createTextNode(i))
  1601. }
  1602. }
  1603. function u(e, t) {
  1604. var i = t.css,
  1605. n = t.sourceMap;
  1606. n && (i += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(n)))) + " */");
  1607. var r = new Blob([i], {
  1608. type: "text/css"
  1609. }),
  1610. o = e.href;
  1611. e.href = URL.createObjectURL(r), o && URL.revokeObjectURL(o)
  1612. }
  1613. var f = {},
  1614. d = function(e) {
  1615. var t;
  1616. return function() {
  1617. return "undefined" == typeof t && (t = e.apply(this, arguments)), t
  1618. }
  1619. },
  1620. m = d(function() {
  1621. return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())
  1622. }),
  1623. v = d(function() {
  1624. return document.head || document.getElementsByTagName("head")[0]
  1625. }),
  1626. g = null,
  1627. y = 0,
  1628. b = [];
  1629. e.exports = function(e, t) {
  1630. t = t || {}, "undefined" == typeof t.singleton && (t.singleton = m()), "undefined" == typeof t.insertAt && (t.insertAt = "bottom");
  1631. var i = r(e);
  1632. return n(i, t), function(e) {
  1633. for (var o = [], s = 0; s < i.length; s++) {
  1634. var a = i[s],
  1635. l = f[a.id];
  1636. l.refs--, o.push(l)
  1637. }
  1638. if (e) {
  1639. var h = r(e);
  1640. n(h, t)
  1641. }
  1642. for (var s = 0; s < o.length; s++) {
  1643. var l = o[s];
  1644. if (0 === l.refs) {
  1645. for (var c = 0; c < l.parts.length; c++) l.parts[c]();
  1646. delete f[l.id]
  1647. }
  1648. }
  1649. }
  1650. };
  1651. var k = function() {
  1652. var e = [];
  1653. return function(t, i) {
  1654. return e[t] = i, e.filter(Boolean).join("\n")
  1655. }
  1656. }()
  1657. }])
  1658. });