UNPKG

@minix-iot/ui

Version:

基于Vue的移动端轻量级UI组件库

45 lines 433 kB
/*!
 * @minix-iot/ui v0.2.4 - minixui.min.js, 0fca3567ce0d21c53006, Wed Nov 24 2021 14:20:58 GMT+0800 (中国标准时间)
 * (c) 2017-2020 JDC
 * Released under the MIT License.
 */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define("minixui",["vue"],e):"object"==typeof exports?exports.minixui=e(require("vue")):t.minixui=e(t.Vue)}("undefined"!=typeof self?self:this,(function(t){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="./",i(i.s=70)}([function(t,e){t.exports=function(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function i(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t},t.exports.default=t.exports,t.exports.__esModule=!0},function(e,i){e.exports=t},function(t,e,i){var n=i(61),r=i(62),o=i(9),s=i(63);t.exports=function(t){return n(t)||r(t)||o(t)||s()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function i(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=i=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=i=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),i(e)}t.exports=i,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,i){var n=i(64),r=i(65),o=i(9),s=i(66);t.exports=function(t,e){return n(t)||r(t,e)||o(t,e)||s()},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function i(){return t.exports=i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},t.exports.default=t.exports,t.exports.__esModule=!0,i.apply(this,arguments)}t.exports=i,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,i){var n=i(8);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t,e,i){},function(t){t.exports=JSON.parse('{"a":"0.2.4"}')},function(t){t.exports=JSON.parse('{"a":[{"name":"Icon","version":"1.0.0","sort":"5","chnName":"图标","type":"component","showDemo":true,"desc":"网页小图标。","author":"zoiew"},{"name":"Switch","version":"1.0.0","sort":"1","chnName":"开关","type":"component","showDemo":true,"desc":"滑动开关,通过点击使按钮左右滑动,同时触发对应的开关状态","author":"zoiew"},{"version":"1.0.0","name":"Button","sort":"5","chnName":"按钮","desc":"各式各样的按钮","type":"component","showDemo":true,"author":"zoiew"},{"version":"1.0.0","name":"ButtonGroup","chnName":"按钮组","desc":"用于页面底部的按钮组","type":"component","sort":"5","showDemo":true,"author":"zoiew"},{"version":"1.0.0","name":"Lazyload","chnName":"图片懒加载","desc":"图片懒加载","type":"component","sort":"0","showDemo":true,"author":"zoiew"},{"version":"1.0.0","name":"Popup","type":"component","chnName":"弹出层","desc":"弹出层容器,用于展示弹窗、信息提示等","sort":"5","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"Cell","type":"component","chnName":"单元格","desc":"单元格","sort":"1","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"Badge","type":"component","chnName":"徽标","desc":"徽标","sort":"1","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"PullRefresh","type":"component","chnName":"下拉刷新","desc":"下拉刷新","sort":"5","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"NavBar","type":"component","chnName":"导航栏","desc":"导航栏","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"SearchBar","type":"component","chnName":"搜索栏","desc":"搜索栏","sort":"2","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"Tag","type":"component","chnName":"标记","desc":"标记","sort":"1","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"NoticeBar","type":"component","chnName":"通知栏","desc":"通知栏","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"Overlay","type":"component","chnName":"蒙层","desc":"蒙层","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"Modal","type":"component","chnName":"模态框","desc":"模态框","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"Dialog","type":"component","chnName":"对话框","desc":"对话框","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"Empty","type":"component","chnName":"空白提示","desc":"空白提示","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"ScrollView","type":"component","chnName":"滚动视图","desc":"滚动视图","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"Checkbox","type":"component","chnName":"单选框","desc":"单选框","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"Radio","type":"component","chnName":"多选框","desc":"多选框","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"Picker","type":"component","chnName":"选择器","desc":"选择器","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"Rate","type":"component","chnName":"评分","desc":"评分","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"PickerColumn","type":"component","chnName":"选择器列","desc":"选择器列","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"DateTimePicker","type":"component","chnName":"日期时间选择器","desc":"日期时间选择器","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"Mask","type":"component","chnName":"活动运营推广框","desc":"活动运营推广框","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"ActionSheet","type":"component","chnName":"动作清单","desc":"动作清单","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"Toast","type":"component","chnName":"轻提示","desc":"轻提示","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"TabBar","type":"component","chnName":"标签栏","desc":"标签栏","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"TabBarItem","type":"component","chnName":"标签栏项","desc":"标签栏项","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"Tab","type":"component","chnName":"标签页","desc":"标签页","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"TabPane","type":"component","chnName":"标签页页面组件","desc":"标签页页面组件","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"name":"Catalog","sort":"5","chnName":"目录栏","desc":"目录标题栏","type":"component","showDemo":true,"author":"zoiew"},{"version":"1.0.0","name":"Slider","type":"component","chnName":"滑块","desc":"滑块","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"SliderScale","type":"component","chnName":"滑块刻度","desc":"滑块刻度","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"PullRefresh","type":"component","chnName":"下拉刷新","desc":"下拉刷新","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"Loading","type":"component","chnName":"加载","desc":"加载","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"Swiper","type":"component","chnName":"轮播","desc":"轮播","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"SwiperItem","type":"component","chnName":"轮播项","desc":"轮播项","sort":"4","showDemo":true,"author":"zoiew","showTest":true},{"version":"1.0.0","name":"List","type":"component","chnName":"列表","desc":"列表","sort":"0","showDemo":true,"author":"minxinFeng","showTest":true},{"version":"1.0.0","name":"Steps","type":"component","chnName":"步骤条","desc":"步骤条","sort":"0","showDemo":true,"author":"minxinFeng","showTest":true},{"version":"1.0.0","name":"Step","type":"component","chnName":"列表","desc":"步骤项","sort":"0","showDemo":true,"author":"minxinFeng","showTest":true},{"version":"1.0.0","name":"ChartLine","type":"component","chnName":"折线图","desc":"折线图","sort":"0","showDemo":true,"author":"minxinFeng","showTest":true},{"version":"1.0.0","name":"ChartColumn","type":"component","chnName":"柱状图","desc":"柱状图","sort":"0","showDemo":true,"author":"minxinFeng","showTest":true},{"version":"1.0.0","name":"ChartPie","type":"component","chnName":"饼图","desc":"饼图","sort":"0","showDemo":true,"author":"minxinFeng","showTest":true},{"version":"1.0.0","name":"Sticky","type":"component","chnName":"粘性布局","desc":"粘性布局","sort":"0","showDemo":true,"author":"minxinFeng","showTest":true},{"version":"1.0.0","name":"Collapse","chnName":"折叠面板","desc":"折叠面板","type":"component","sort":"0","showDemo":true,"author":"zoiew"},{"version":"1.0.0","name":"CollapseItem","type":"component","chnName":"折叠项","desc":"折叠项","sort":"0","showDemo":true,"author":"zoiew","showTest":true}]}')},function(t,e,i){"use strict";function n(){return(n=Object.assign||function(t){for(var e,i=1;i<arguments.length;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)}var r=["attrs","props","domProps"],o=["class","style","directives"],s=["on","nativeOn"],a=function(t,e){return function(){t&&t.apply(this,arguments),e&&e.apply(this,arguments)}};t.exports=function(t){return t.reduce((function(t,e){for(var i in e)if(t[i])if(-1!==r.indexOf(i))t[i]=n({},t[i],e[i]);else if(-1!==o.indexOf(i)){var l=t[i]instanceof Array?t[i]:[t[i]],c=e[i]instanceof Array?e[i]:[e[i]];t[i]=l.concat(c)}else if(-1!==s.indexOf(i))for(var h in e[i])if(t[i][h]){var u=t[i][h]instanceof Array?t[i][h]:[t[i][h]],f=e[i][h]instanceof Array?e[i][h]:[e[i][h]];t[i][h]=u.concat(f)}else t[i][h]=e[i][h];else if("hook"==i)for(var p in e[i])t[i][p]=t[i][p]?a(t[i][p],e[i][p]):e[i][p];else t[i]=e[i];else t[i]=e[i];return t}),{})}},function(t,e,i){var n=i(67),r=i(68);function o(e,i,s){return r()?(t.exports=o=Reflect.construct,t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=o=function(t,e,i){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return i&&n(o,i.prototype),o},t.exports.default=t.exports,t.exports.__esModule=!0),o.apply(null,arguments)}t.exports=o,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e,i){(function(t){(function(e){"use strict";var i=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},n=function(t,e){if(!i(t))return t;for(var n=[],r=0;r<t.length;r++){var o=t[r];e(o,r)&&n.push(o)}return n},r={}.toString,o=function(t,e){return r.call(t)==="[object "+e+"]"},s=function(t){return o(t,"Function")},a=function(t){return null==t},l=function(t){return Array.isArray?Array.isArray(t):o(t,"Array")},c=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e};function h(t,e){if(t)if(l(t))for(var i=0,n=t.length;i<n&&!1!==e(t[i],i);i++);else if(c(t))for(var r in t)if(t.hasOwnProperty(r)&&!1===e(t[r],r))break}var u=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return h(t,(function(i,n){s(t)&&"prototype"===n||e.push(n)})),e},f=function(t){return"object"==typeof t&&null!==t},p=function(t){if(!f(t)||!o(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},d=function(t){var e=t.filter((function(t){return!isNaN(t)}));if(!e.length)return{min:0,max:0};if(l(t[0])){for(var i=[],n=0;n<t.length;n++)i=i.concat(t[n]);e=i}var r=function(t){if(l(t))return t.reduce((function(t,e){return Math.max(t,e)}),t[0])}(e);return{min:function(t){if(l(t))return t.reduce((function(t,e){return Math.min(t,e)}),t[0])}(e),max:r}},g=function(t){return o(t,"String")};function v(t,e){void 0===e&&(e=new Map);var i=[];if(Array.isArray(t))for(var n=0,r=t.length;n<r;n++){var o=t[n];e.has(o)||(i.push(o),e.set(o,!0))}return i}function m(t){if(i(t))return t[0]}function y(t){if(i(t))return t[t.length-1]}var x=function(t,e){var i=e.toString(),n=i.indexOf(".");if(-1===n)return Math.round(t);var r=i.substr(n+1).length;return r>20&&(r=20),parseFloat(t.toFixed(r))},b=function(t){return o(t,"Number")},S=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return h(t,(function(i,n){s(t)&&"prototype"===n||e.push(i)})),e},w=function(t){return a(t)?"":t.toString()},k=function(t){var e=w(t);return e.charAt(0).toLowerCase()+e.substring(1)};function C(t,e){return t&&e?t.replace(/\\?\{([^{}]+)\}/g,(function(t,i){return"\\"===t.charAt(0)?t.slice(1):void 0===e[i]?"":e[i]})):t}var T=function(t){var e=w(t);return e.charAt(0).toUpperCase()+e.substring(1)},P={}.toString,M=function(t){return o(t,"Boolean")},_=function(t){return o(t,"Date")},I=Object.prototype;function D(t,e){for(var i in e)e.hasOwnProperty(i)&&"constructor"!==i&&void 0!==e[i]&&(t[i]=e[i])}function O(t,e,i,n){return e&&D(t,e),i&&D(t,i),n&&D(t,n),t}function E(t,e,i,n){for(var r in i=i||0,n=n||5,e)if(e.hasOwnProperty(r)){var o=e[r];null!==o&&p(o)?(p(t[r])||(t[r]={}),i<n?E(t[r],o,i+1,n):t[r]=e[r]):l(o)?(t[r]=[],t[r]=t[r].concat(o)):void 0!==o&&(t[r]=o)}}var A=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];for(var n=0;n<e.length;n+=1)E(t,e[n]);return t},B=function(t,e){if(!i(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,o=0;o<t.length;o++)if(t[o]===e){r=o;break}return r},Y=Object.prototype.hasOwnProperty;function z(t){if(a(t))return!0;if(i(t))return!t.length;var e=function(t){return P.call(t).replace(/^\[object /,"").replace(/]$/,"")}(t);if("Map"===e||"Set"===e)return!t.size;if(function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||I)}(t))return!Object.keys(t).length;for(var n in t)if(Y.call(t,n))return!1;return!0}var N=function(t,e){if(t===e)return!0;if(!t||!e)return!1;if(g(t)||g(e))return!1;if(i(t)||i(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=N(t[r],e[r]));r++);return n}if(f(t)||f(e)){var o=Object.keys(t),s=Object.keys(e);if(o.length!==s.length)return!1;for(n=!0,r=0;r<o.length&&(n=N(t[o[r]],e[o[r]]));r++);return n}return!1};function H(t){return a(t)?0:i(t)?t.length:Object.keys(t).length}
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation.

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    PERFORMANCE OF THIS SOFTWARE.
    ***************************************************************************** */var L,X=function(t,e){return(X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function F(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}X(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}function j(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),r=0;for(e=0;e<i;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,r++)n[r]=o[s];return n}function R(t){for(var e=[],i=0,n=t.length;i<n;i++)e=e.concat(t[i]);return e}function $(t,e){for(var i=[],n={},r=0,o=t.length;r<o;r++){var s=t[r][e];a(s)||(l(s)?h(s,(function(t){n[t]||(i.push(t),n[t]=!0)})):n[s]||(i.push(s),n[s]=!0))}return i}function W(t,e){for(var i=null,n=0,r=t.length;n<r;n++){var o=t[n][e];if(!a(o)){i=l(o)?o[0]:o;break}}return i}function G(t,e){if(!e)return{0:t};for(var i=function(t){for(var i="_",n=0,r=e.length;n<r;n++)i+=t[e[n]]&&t[e[n]].toString();return i},n={},r=0,o=t.length;r<o;r++){var s=t[r],a=i(s);n[a]?n[a].push(s):n[a]=[s]}return n}function V(t,e,i){if(void 0===i&&(i={}),!e)return[t];var n=G(t,e),r=[];if(1===e.length&&i[e[0]])h(i[e[0]],(function(t){t="_"+t,r.push(n[t])}));else for(var o in n)r.push(n[o]);return r}function q(t,e){if(t){var i=t.indexOf(e);-1!==i&&t.splice(i,1)}}function U(t){if(!t.length)return{min:0,max:0};var e=Math.max.apply(null,t);return{min:Math.min.apply(null,t),max:e}}!function(t,e){if(!s(t))throw new TypeError("Expected a function");var i=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e?e.apply(this,n):n[0],s=i.cache;if(s.has(o))return s.get(o);var a=t.apply(this,n);return s.set(o,a),a};i.cache=new Map}((function(t,e){void 0===e&&(e={});var i=e.fontSize,n=e.fontFamily,r=e.fontWeight,o=e.fontStyle,s=e.fontVariant;return L||(L=document.createElement("canvas").getContext("2d")),L.font=[o,s,r,i+"px",n].join(" "),L.measureText(g(t)?t:"").width}),(function(t,e){return void 0===e&&(e={}),j([t],S(e)).join("")}));var K=Object.freeze({__proto__:null,merge:R,values:$,firstValue:W,group:V,groupToMap:G,remove:q,getRange:U}),Z=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0},Q="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync,J="object"==typeof my&&"function"==typeof my.getSystemInfoSync,tt=typeof t&&!1,et="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.sessionStorage;function it(t){return!(!t||"object"!=typeof t||(1!==t.nodeType||!t.nodeName)&&!t.isCanvasElement)}function nt(){return window&&window.devicePixelRatio||1}function rt(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}function ot(t){var e=rt(t,"width");return"auto"===e&&(e=t.offsetWidth),parseFloat(e)}function st(t){var e=rt(t,"height");return"auto"===e&&(e=t.offsetHeight),parseFloat(e)}function at(t){return t?document.getElementById(t):null}function lt(t,e){var i=e.get("el");if(!i)return t;var n=i.getBoundingClientRect(),r=n.top,o=n.left,s=parseFloat(rt(i,"padding-left")),a=parseFloat(rt(i,"padding-top"));return{x:t.x-o-s,y:t.y-r-a}}function ct(t,e,i){t.addEventListener(e,i,Z)}function ht(t,e,i){t.removeEventListener(e,i,Z)}function ut(t,e){var i=e.get("landscape");if(!i)return t;if(s(i))return i(t,e);var n=e.get("height");return{x:t.y,y:n-t.x}}function ft(t,e){var i=t.touches;if(!i)return[ut(lt({x:t.clientX,y:t.clientY},e),e)];i.length||(i=t.changedTouches||[]);for(var n=[],r=0,o=i.length;r<o;r++){var s=i[r],a=s.x,l=s.y,c=s.clientX,h=s.clientY,u=void 0;u=b(a)||b(l)?{x:a,y:l}:lt({x:c,y:h},e),n.push(ut(u,e))}return n}function pt(t,e){var i=ft(t,e.get("canvas"))[0]||{};return{type:t.type,chart:e,native:t,x:i.x,y:i.y}}function dt(t,e,i){return i||(i=document.createElement("canvas").getContext("2d")),i.font=e||"12px sans-serif",i.measureText(t)}function gt(t){var e,i,n,r;return b(t)||g(t)?e=n=r=i=t:l(t)&&(e=t[0],i=a(t[1])?t[0]:t[1],n=a(t[2])?t[0]:t[2],r=a(t[3])?i:t[3]),[e,i,n,r]}function vt(t,e){return void 0===t||"string"==typeof t&&-1!==t.indexOf(e)}function mt(t){return g(t)&&(t=t.indexOf("T")>0?new Date(t).getTime():new Date(t.replace(/-/gi,"/")).getTime()),_(t)&&(t=t.getTime()),t}var yt=Object.freeze({__proto__:null,Array:K,upperFirst:T,lowerFirst:k,isString:g,isNumber:b,isBoolean:M,isFunction:s,isDate:_,isArray:l,isNil:a,isObject:c,isPlainObject:p,isEqual:N,deepMix:A,mix:O,each:h,uniq:v,find:function(t,e){if(!l(t))return null;var i;if(s(e)&&(i=e),p(e)&&(i=function(t){return function(t,e){var i=u(e),n=i.length;if(a(t))return!n;for(var r=0;r<n;r+=1){var o=i[r];if(e[o]!==t[o]||!(o in t))return!1}return!0}(t,e)}),i)for(var n=0;n<t.length;n+=1)if(i(t[n]))return t[n];return null},isObjectValueEqual:function(t,e){t=Object.assign({},t),e=Object.assign({},e);var i=Object.getOwnPropertyNames(t),n=Object.getOwnPropertyNames(e);if(i.length!==n.length)return!1;for(var r=0,o=i.length;r<o;r++){var s=i[r];if(t[s]!==e[s])return!1}return!0},parsePadding:gt,directionEnabled:vt,toTimeStamp:mt,substitute:C,isWx:Q,isMy:J,isNode:tt,isBrowser:et,isCanvasElement:it,getPixelRatio:nt,getStyle:rt,getWidth:ot,getHeight:st,getDomById:at,getRelativePosition:lt,addEventListener:ct,removeEventListener:ht,createEvent:pt,convertPoints:ft,measureText:dt}),xt={label:{fill:"#808080",fontSize:10},line:{stroke:"#E8E8E8",lineWidth:1},grid:{type:"line",stroke:"#E8E8E8",lineWidth:1,lineDash:[2]},tickLine:null,labelOffset:7.5},bt={fontFamily:'"Helvetica Neue", "San Francisco", Helvetica, Tahoma, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", sans-serif',defaultColor:"#1890FF",pixelRatio:1,padding:"auto",appendPadding:15,colors:["#1890FF","#2FC25B","#FACC14","#223273","#8543E0","#13C2C2","#3436C7","#F04864"],shapes:{line:["line","dash"],point:["circle","hollowCircle"]},sizes:[4,10],axis:{common:xt,bottom:O({},xt,{grid:null}),left:O({},xt,{line:null}),right:O({},xt,{line:null}),circle:O({},xt,{line:null}),radius:O({},xt,{labelOffset:4})},shape:{line:{lineWidth:2,lineJoin:"round",lineCap:"round"},point:{lineWidth:0,size:3},area:{fillOpacity:.1}},_defaultAxis:xt},St={general:{title:"这是一个图表,",withTitle:"这是一个关于“{title}”的图表。"},coord:{cartesian:"X轴是{xLabel}Y轴是{yLabel}"},scale:{linear:"数值型,数据最小值为{min},最大值为{max};",cat:"分类型, 分类类型有:{values};",timeCat:"时间型,时间范围从{start}到{end};"},geometry:{prefix:"共有{count}种分类组成,",oneData:"第{index}类是{name},数据是{values};",partData:"第{index}类是{name},共有{count}项数据,前{part}项是{values};",allData:"第{index}类是{name},有{count}项数据,分别是{values};"},legend:{prefix:"图例分类有:"}},wt={version:"3.8.10-beta.1",scales:{},widthRatio:{column:.5,rose:.999999,multiplePie:3/4},lineDash:[4,4],lang:St};function kt(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Ct(){return(Ct=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}function Tt(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Pt(t,e)}function Pt(t,e){return(Pt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Mt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}wt.setTheme=function(t){A(wt,t)},wt.setTheme(bt);var _t=function(){function t(){this.__events={}}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this.__events[t]||[];i.push(e),this.__events[t]=i}},e.emit=function(t,e){var i=this;if(c(t)&&(t=(e=t)&&e.type),t){var n=this.__events[t];n&&n.length&&n.forEach((function(t){t.call(i,e)}))}},e.off=function(t,e){var i=this.__events,n=i[t];if(n&&n.length)if(e)for(var r=0,o=n.length;r<o;r++)n[r]===e&&(n.splice(r,1),r--);else delete i[t]},t}(),It=function(t){Tt(i,t);var e=i.prototype;function i(e){var i,n={},r=(i=t.call(this)||this).getDefaultCfg();return i._attrs=n,O(n,r,e),i}return e.getDefaultCfg=function(){return{}},e.get=function(t){return this._attrs[t]},e.set=function(t,e){this._attrs[t]=e},e.destroy=function(){this._attrs={},this.destroyed=!0},i}(_t),Dt=function(){function t(t){O(this,t),this._init()}var e=t.prototype;return e._init=function(){var t=this.start,e=this.end,i=Math.min(t.x,e.x),n=Math.max(t.x,e.x),r=Math.min(t.y,e.y),o=Math.max(t.y,e.y);this.tl={x:i,y:r},this.tr={x:n,y:r},this.bl={x:i,y:o},this.br={x:n,y:o},this.width=n-i,this.height=o-r},e.reset=function(t,e){this.start=t,this.end=e,this._init()},e.isInRange=function(t,e){c(t)&&(e=t.y,t=t.x);var i=this.tl,n=this.br;return i.x<=t&&t<=n.x&&i.y<=e&&e<=n.y},t}(),Ot={generateDefault:function(){return[1,0,0,1,0,0]},isChanged:function(t){return 1!==t[0]||0!==t[1]||0!==t[2]||1!==t[3]||0!==t[4]||0!==t[5]},multiply:function(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]},scale:function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[0],t[2]=e[2]*i[1],t[3]=e[3]*i[1],t[4]=e[4],t[5]=e[5],t},rotate:function(t,e,i){var n=Math.cos(i),r=Math.sin(i),o=e[0]*n+e[2]*r,s=e[1]*n+e[3]*r,a=e[0]*-r+e[2]*n,l=e[1]*-r+e[3]*n;return t[0]=o,t[1]=s,t[2]=a,t[3]=l,t[4]=e[4],t[5]=e[5],t},translate:function(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+e[0]*i[0]+e[2]*i[1],t[5]=e[5]+e[1]*i[0]+e[3]*i[1],t},transform:function(t,e){for(var i=[].concat(t),n=0,r=e.length;n<r;n++){var o=e[n];switch(o[0]){case"t":Ot.translate(i,i,[o[1],o[2]]);break;case"s":Ot.scale(i,i,[o[1],o[2]]);break;case"r":Ot.rotate(i,i,o[1])}}return i}},Et={create:function(){return[0,0]},length:function(t){var e=t[0],i=t[1];return Math.sqrt(e*e+i*i)},normalize:function(t,e){var i=this.length(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t},add:function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},sub:function(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t},scale:function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},direction:function(t,e){return t[0]*e[1]-e[0]*t[1]},angle:function(t,e){var i=this.dot(t,e)/(this.length(t)*this.length(e));return Math.acos(i)},angleTo:function(t,e,i){var n=this.angle(t,e),r=this.direction(t,e)>=0;return i?r?2*Math.PI-n:n:r?n:2*Math.PI-n},zero:function(t){return 0===t[0]&&0===t[1]},distance:function(t,e){var i=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(i*i+n*n)},clone:function(t){return[t[0],t[1]]},min:function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},max:function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t},transformMat2d:function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t}},At=[1,0,0,1,0,0],Bt=function(){var t=e.prototype;function e(t){var e,i;this._initDefaultCfg(),O(this,t),this.plot?(e=this.plot.bl,i=this.plot.tr,this.start=e,this.end=i):(e=this.start,i=this.end),this.init(e,i)}return t._initDefaultCfg=function(){},t._scale=function(t,e){var i=this.matrix,n=this.center;Ot.translate(i,i,[n.x,n.y]),Ot.scale(i,i,[t,e]),Ot.translate(i,i,[-n.x,-n.y])},t.init=function(t,e){this.matrix=[].concat(At),this.center={x:(e.x-t.x)/2+t.x,y:(e.y-t.y)/2+t.y},this.scale&&this._scale(this.scale[0],this.scale[1])},t.convertPoint=function(t){var e=this._convertPoint(t),i=e.x,n=e.y;if(!Ot.isChanged(this.matrix))return{x:i,y:n};var r=[i,n];return Et.transformMat2d(r,r,this.matrix),{x:r[0],y:r[1]}},t.invertPoint=function(t){return this._invertPoint(t)},t._convertPoint=function(t){return t},t._invertPoint=function(t){return t},t.reset=function(t){this.plot=t;var e=t.bl,i=t.tr;this.start=e,this.end=i,this.init(e,i)},e}(),Yt=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initDefaultCfg=function(){this.type="cartesian",this.transposed=!1,this.isRect=!0},i.init=function(e,i){t.prototype.init.call(this,e,i),this.x={start:e.x,end:i.x},this.y={start:e.y,end:i.y}},i._convertPoint=function(t){var e=this.transposed,i=e?"y":"x",n=e?"x":"y",r=this.x,o=this.y;return{x:r.start+(r.end-r.start)*t[i],y:o.start+(o.end-o.start)*t[n]}},i._invertPoint=function(t){var e=this.transposed,i=e?"y":"x",n=e?"x":"y",r=this.x,o=this.y,s={};return s[i]=(t.x-r.start)/(r.end-r.start),s[n]=(t.y-o.start)/(o.end-o.start),s},e}(Bt);function zt(t,e){return g(e)?e:t.invert(t.scale(e))}Bt.Cartesian=Yt,Bt.Rect=Yt;var Nt=function(){function t(t){var e=this;this.type="base",this.name=null,this.method=null,this.values=[],this.scales=[],this.linear=null;var i=null,n=this.callback;if(t.callback){var r=t.callback;i=function(){for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];var s=r.apply(void 0,i);return a(s)&&(s=n.apply(e,i)),s}}O(this,t),i&&O(this,{callback:i})}var e=t.prototype;return e._getAttrValue=function(t,e){var i=this.values;if(t.isCategory&&!this.linear)return i[t.translate(e)%i.length];var n=t.scale(e);return this.getLinearValue(n)},e.getLinearValue=function(t){var e=this.values,i=e.length-1,n=Math.floor(i*t),r=i*t-n,o=e[n];return o+((n===i?o:e[n+1])-o)*r},e.callback=function(t){var e=this.scales[0];return"identity"===e.type?e.value:this._getAttrValue(e,t)},e.getNames=function(){for(var t=this.scales,e=this.names,i=Math.min(t.length,e.length),n=[],r=0;r<i;r++)n.push(e[r]);return n},e.getFields=function(){var t=this.scales,e=[];return h(t,(function(t){e.push(t.field)})),e},e.getScale=function(t){return this.scales[this.names.indexOf(t)]},e.mapping=function(){for(var t=this.scales,e=this.callback,i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];var o=n;if(e){for(var s=0,a=n.length;s<a;s++)n[s]=this._toOriginParam(n[s],t[s]);o=e.apply(this,n)}return o=[].concat(o)},e._toOriginParam=function(t,e){var i=t;if(!e.isLinear)if(l(t)){i=[];for(var n=0,r=t.length;n<r;n++)i.push(zt(e,t[n]))}else i=zt(e,t);return i},t}(),Ht=function(t){function e(e){var i;return(i=t.call(this,e)||this).names=["x","y"],i.type="position",i}return Tt(e,t),e.prototype.mapping=function(t,e){var i,n,r,o=this.scales,s=this.coord,c=o[0],u=o[1];if(a(t)||a(e))return[];if(l(e)&&l(t)){i=[],n=[];for(var f=0,p=0,d=t.length,g=e.length;f<d&&p<g;f++,p++)r=s.convertPoint({x:c.scale(t[f]),y:u.scale(e[p])}),i.push(r.x),n.push(r.y)}else if(l(e))t=c.scale(t),n=[],h(e,(function(e){e=u.scale(e),r=s.convertPoint({x:t,y:e}),i&&i!==r.x?(l(i)||(i=[i]),i.push(r.x)):i=r.x,n.push(r.y)}));else if(l(t))e=u.scale(e),i=[],h(t,(function(t){t=c.scale(t),r=s.convertPoint({x:t,y:e}),n&&n!==r.y?(l(n)||(n=[n]),n.push(r.y)):n=r.y,i.push(r.x)}));else{t=c.scale(t),e=u.scale(e);var v=s.convertPoint({x:t,y:e});i=v.x,n=v.y}return[i,n]},e}(Nt),Lt=function(t){function e(e){var i;return(i=t.call(this,e)||this).names=["shape"],i.type="shape",i.gradient=null,i}return Tt(e,t),e.prototype.getLinearValue=function(t){var e=this.values;return e[Math.round((e.length-1)*t)]},e}(Nt),Xt=function(t){function e(e){var i;return(i=t.call(this,e)||this).names=["size"],i.type="size",i.gradient=null,i}return Tt(e,t),e}(Nt);function Ft(t,e,i,n){return t[n]+(e[n]-t[n])*i}function jt(t){return"#"+Rt(t[0])+Rt(t[1])+Rt(t[2])}function Rt(t){return 1===(t=(t=Math.round(t)).toString(16)).length&&(t="0"+t),t}var $t={black:"#000000",blue:"#0000ff",grey:"#808080",green:"#008000",orange:"#ffa500",pink:"#ffc0cb",purple:"#800080",red:"#ff0000",white:"#ffffff",yellow:"#ffff00"};function Wt(t){var e=[];return g(t)&&(t=t.split("-")),h(t,(function(t){var i,n;-1===t.indexOf("#")&&(t=function(t){if($t[t])return $t[t];if("#"===t[0]){if(7===t.length)return t;var e=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,i,n){return"#"+e+e+i+i+n+n}));return $t[t]=e,e}var i=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return i.shift(),i=jt(i),$t[t]=i,i}(t)),e.push((i=t,(n=[]).push(parseInt(i.substr(1,2),16)),n.push(parseInt(i.substr(3,2),16)),n.push(parseInt(i.substr(5,2),16)),n))})),function(t){return function(t,e){var i=t.length-1,n=Math.floor(i*e),r=i*e-n,o=t[n],s=n===i?o:t[n+1];return jt([Ft(o,s,r,0),Ft(o,s,r,1),Ft(o,s,r,2)])}(e,t)}}var Gt=function(t){function e(e){var i;return(i=t.call(this,e)||this).names=["color"],i.type="color",i.gradient=null,g(i.values)&&(i.linear=!0),i}return Tt(e,t),e.prototype.getLinearValue=function(t){var e=this.gradient;return e||(e=Wt(this.values),this.gradient=e),e(t)},e}(Nt),Vt=Object.freeze({__proto__:null,Position:Ht,Shape:Lt,Size:Xt,Color:Gt}),qt={},Ut={_coord:null,draw:function(t,e){this.drawShape&&this.drawShape(t,e)},setCoord:function(t){this._coord=t},parsePoint:function(t){var e=this._coord;return e.isPolar&&(1===t.x&&(t.x=.9999999),1===t.y&&(t.y=.9999999)),e.convertPoint(t)},parsePoints:function(t){if(!t)return!1;var e=this,i=[];return t.forEach((function(t){i.push(e.parsePoint(t))})),i}},Kt={defaultShapeType:null,setCoord:function(t){this._coord=t},getShape:function(t){l(t)&&(t=t[0]);var e=this[t]||this[this.defaultShapeType];return e._coord=this._coord,e},getShapePoints:function(t,e){var i=this.getShape(t);return(i.getPoints||i.getShapePoints||this.getDefaultPoints)(e)},getDefaultPoints:function(){return[]},drawShape:function(t,e,i){var n=this.getShape(t);return e.color||(e.color=wt.colors[0]),n.draw(e,i)}};function Zt(t,e){for(var i in e)e.hasOwnProperty(i)&&"constructor"!==i&&void 0!==e[i]&&(t[i]=e[i])}qt.registerFactory=function(t,e){var i=T(t),n=O({},Kt,e);return qt[i]=n,n.name=t,n},qt.registerShape=function(t,e,i){var n=T(t),r=qt[n],o=O({},Ut,i);return r[e]=o,o},qt.registShape=qt.registerShape,qt.getShapeFactory=function(t){return this[T(t=t||"point")]};var Qt=function(t,e,i,n){return e&&Zt(t,e),i&&Zt(t,i),n&&Zt(t,n),t},Jt=function(){var t=e.prototype;function e(t){this._initDefaultCfg(),Qt(this,t)}return t._initDefaultCfg=function(){this.adjustNames=["x","y"]},t.processAdjust=function(){},e}();function te(t){var e=t.type,i=t.values;if("linear"===e)return C(St.scale.linear,t);if("cat"===e)return C(St.scale.cat,{values:i.slice(0,10).join(" ")});if("timeCat"===e){var n=t.getText(i[0]),r=t.getText(i[i.length-1]);return C(St.scale.timeCat,{start:n,end:r})}return""}var ee=["color","size","shape"];function ie(t){return l(t)?t:g(t)?t.split("*"):[t]}var ne=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i.getDefaultCfg=function(){return{type:null,data:null,attrs:{},scales:{},container:null,styleOptions:null,chart:null,shapeType:"",generatePoints:!1,attrOptions:{},sortable:!1,startOnZero:!0,visible:!0,connectNulls:!1,ignoreEmptyGroup:!1,isInit:!1}},i.init=function(){this.get("isInit")||(this._initAttrs(),this._processData(),this.set("isInit",!0))},i._getGroupScales=function(){var t=this,e=[];return h(ee,(function(i){var n=t.getAttr(i);n&&h(n.scales,(function(t){t&&t.isCategory&&-1===e.indexOf(t)&&e.push(t)}))})),e},i._groupData=function(t){var e=this.get("colDefs"),i=this._getGroupScales();if(i.length){var n={},r=[];return h(i,(function(t){var i=t.field;r.push(i),e&&e[i]&&e[i].values&&(n[t.field]=e[i].values)})),V(t,r,n)}return[t]},i._setAttrOptions=function(t,e){this.get("attrOptions")[t]=e;var i=this.get("attrs");Object.keys(i).length&&this._createAttr(t,e)},i._createAttrOption=function(t,e,i,n){var r={};r.field=e,i?s(i)?r.callback=i:r.values=i:r.values=n,this._setAttrOptions(t,r)},i._createAttr=function(t,e){var i=this.get("attrs"),n=this.get("coord"),r=T(t),o=ie(e.field);"position"===t&&(e.coord=n);for(var s=[],a=0,l=o.length;a<l;a++){var c=o[a],h=this._createScale(c);s.push(h)}if("position"===t){var u=s[1];"polar"===n.type&&n.transposed&&this.hasAdjust("stack")&&u.values.length&&u.change({nice:!1,min:0,max:Math.max.apply(null,u.values)})}e.scales=s;var f=new Vt[r](e);return i[t]=f,f},i._initAttrs=function(){var t=this.get("attrOptions");for(var e in t)t.hasOwnProperty(e)&&this._createAttr(e,t[e])},i._createScale=function(t){var e=this.get("scales"),i=e[t];return i||(i=this.get("chart").createScale(t),e[t]=i),i},i._processData=function(){var t=this.get("data"),e=[],i=this._groupData(t);if(this.get("ignoreEmptyGroup")){var n=this.getYScale();i=i.filter((function(t){return t.some((function(t){return void 0!==t[n.field]}))}))}for(var r=0,o=i.length;r<o;r++){var s=i[r],a=this._saveOrigin(s);this.hasAdjust("dodge")&&this._numberic(a),e.push(a)}return this.get("adjust")&&this._adjustData(e),this.get("sortable")&&this._sort(e),this.emit("afterprocessdata",{dataArray:e}),this.set("mappingData",e),this.set("dataArray",e),e},i._saveOrigin=function(t){for(var e=[],i=0,n=t.length;i<n;i++){var r=t[i],o={};for(var s in r)o[s]=r[s];o._origin=r,e.push(o)}return e},i._numberic=function(t){for(var e=this.getAttr("position").scales,i=0,n=t.length;i<n;i++)for(var r=t[i],o=Math.min(2,e.length),s=0;s<o;s++){var a=e[s];if(a.isCategory){var l=a.field;r[l]=a.translate(r[l])}}},i._adjustData=function(t){var e=this.get("adjust");if(e){var i=T(e.type);if(!Jt[i])throw new Error("not support such adjust : "+e);var n=this.getXScale(),r=this.getYScale(),o=O({xField:n.field,yField:r.field},e);new Jt[i](o).processAdjust(t),"Stack"===i&&this._updateStackRange(r.field,r,t)}},i._updateStackRange=function(t,e,i){for(var n=R(i),r=e.min,o=e.max,s=0,a=n.length;s<a;s++){var l=n[s],c=Math.min.apply(null,l[t]),h=Math.max.apply(null,l[t]);c<r&&(r=c),h>o&&(o=h)}(r<e.min||o>e.max)&&e.change({min:r,max:o})},i._sort=function(t){var e=this.getXScale(),i=e.field,n=e.type;"identity"!==n&&e.values.length>1&&h(t,(function(t){t.sort((function(t,r){return"timeCat"===n?mt(t._origin[i])-mt(r._origin[i]):e.translate(t._origin[i])-e.translate(r._origin[i])}))})),this.set("hasSorted",!0),this.set("dataArray",t)},i.paint=function(){var t=this.get("mappingData"),e=[],i=this.getShapeFactory();i.setCoord(this.get("coord")),this._beforeMapping(t);for(var n=0,r=t.length;n<r;n++){var o=t[n];if(o.length){var s=this._mapping(o);e.push(s),this.draw(s,i)}}this.set("dataArray",e),this.generateAria()},i.getShapeFactory=function(){var t=this.get("shapeFactory");if(!t){var e=this.get("shapeType");t=qt.getShapeFactory(e),this.set("shapeFactory",t)}return t},i._mapping=function(t){var e=this.get("attrs"),i=this.getYScale().field,n={},r=new Array(t.length);for(var o in e)if(e.hasOwnProperty(o))for(var s=e[o],a=s.names,c=s.scales,h=0,u=t.length;h<u;h++){var f=t[h],p=Ct({},f,r[h]);if(p._originY=f[i],"position"===s.type)for(var d=this._getAttrValues(s,f),g=0,v=d.length;g<v;g++){var m=d[g];p[a[g]]=l(m)&&1===m.length?m[0]:m}else{var y=a[0],x=""+y+f[c[0].field],b=n[x];b||(b=this._getAttrValues(s,f),n[x]=b),p[y]=b[0]}r[h]=p}return r},i._getAttrValues=function(t,e){for(var i=t.scales,n=[],r=0,o=i.length;r<o;r++){var s=i[r],a=s.field;"identity"===s.type?n.push(s.value):n.push(e[a])}return t.mapping.apply(t,n)},i.getAttrValue=function(t,e){var i=this.getAttr(t),n=null;return i&&(n=this._getAttrValues(i,e)[0]),n},i._beforeMapping=function(t){this.get("generatePoints")&&this._generatePoints(t)},i.isInCircle=function(){var t=this.get("coord");return t&&t.isPolar},i.getCallbackCfg=function(t,e,i){if(!t)return e;var n={},r=t.map((function(t){return i[t]}));return h(e,(function(t,e){s(t)?n[e]=t.apply(null,r):n[e]=t})),n},i.getDrawCfg=function(t){var e=this.isInCircle(),i={origin:t,x:t.x,y:t.y,color:t.color,size:t.size,shape:t.shape,isInCircle:e,opacity:t.opacity},n=this.get("styleOptions");return n&&n.style&&(i.style=this.getCallbackCfg(n.fields,n.style,t._origin)),this.get("generatePoints")&&(i.points=t.points,i.nextPoints=t.nextPoints),e&&(i.center=this.get("coord").center),i},i.draw=function(t,e){var i=this,n=i.get("container"),r=i.getYScale();h(t,(function(t,o){if(!r||!a(t._origin[r.field])){t.index=o;var s=i.getDrawCfg(t),l=t.shape;i.drawShape(l,t,s,n,e)}}))},i.drawShape=function(t,e,i,n,r){var o=r.drawShape(t,i,n);o&&h([].concat(o),(function(t){t.set("origin",e)}))},i._generatePoints=function(t){var e=this,i=e.getShapeFactory(),n=e.getAttr("shape");h(t,(function(t){for(var r=0,o=t.length;r<o;r++){var s=t[r],a=e.createShapePointsCfg(s),l=n?e._getAttrValues(n,s):null,c=i.getShapePoints(l,a);s.points=c}})),h(t,(function(e,i){var n=t[i+1];n&&(e[0].nextPoints=n[0].points)}))},i.generateAria=function(){var t=this.get("container");if(t.get("aria")){var e=[],i=this.get("coord"),n=this.getXScale(),r=this.getYScale(),o=function(t,e,i){var n=t.type;return St.coord[n]?C(St.coord[n],{xLabel:te(e),yLabel:te(i)}):""}(i,n,r);e.push(o);var s=St.geometry,a=s.prefix,l=s.oneData,c=s.partData,u=s.allData,f=this.get("dataArray"),p=f.length,d=this._getGroupScales()[0];if(d){var g=C(a,{count:p});e.push(g),h(f,(function(t,i){var o=t.length;if(o){var s=t[0]._origin;if(1===o)e.push(C(l,{index:i+1,count:o,name:s[d.field],values:s[r.field]}));else{var a=o>5?c:u,h=t.slice(0,5).map((function(t){var e=t._origin;return n.getText(e[n.field])+":"+r.getText(e[r.field])}));e.push(C(a,{index:i+1,count:o,part:3,name:s[d.field],values:h.join(" ")}))}}}))}t.set("ariaLabel",e.join(""))}},i.createShapePointsCfg=function(t){var e=this.getXScale(),i=this.getYScale();return{x:this._normalizeValues(t[e.field],e),y:i?this._normalizeValues(t[i.field],i):t.y?t.y:.1,y0:i?i.scale(this.getYMinValue()):void 0}},i.getYMinValue=function(){var t=this.getYScale(),e=t.min,i=t.max;return this.get("startOnZero")?i<=0&&e<=0?i:e>=0?e:0:e},i._normalizeValues=function(t,e){var i=[];if(l(t))for(var n=0,r=t.length;n<r;n++){var o=t[n];i.push(e.scale(o))}else i=e.scale(t);return i},i.getAttr=function(t){return this.get("attrs")[t]},i.getXScale=function(){return this.getAttr("position").scales[0]},i.getYScale=function(){return this.getAttr("position").scales[1]},i.hasAdjust=function(t){return this.get("adjust")&&this.get("adjust").type===t},i._getSnap=function(t,e,i){var n,r=0,o=this.getYScale().field;if(this.hasAdjust("stack")&&t.field===o){n=[],i.forEach((function(t){n.push(t._originY)}));for(var s=n.length;r<s&&!(n[0][0]>e);r++){if(n[n.length-1][1]<=e){r=n.length-1;break}if(n[r][0]<=e&&n[r][1]>e)break}}else{(n=t.values).sort((function(t,e){return t-e}));for(var a=n.length;!(!(r<a)||a<=1||(n[0]+n[1])/2>e||(n[r-1]+n[r])/2<=e&&(n[r+1]+n[r])/2>e);r++)if((n[n.length-2]+n[n.length-1])/2<=e){r=n.length-1;break}}return n[r]},i.getSnapRecords=function(t){var e=this,i=e.get("coord"),n=e.getXScale(),r=e.getYScale(),o=n.field,s=e.get("dataArray");this.get("hasSorted")||this._sort(s);var c=[],h=i.invertPoint(t),u=h.x;e.isInCircle()&&!i.transposed&&u>(1+n.rangeMax())/2&&(u=n.rangeMin());var f=n.invert(u);n.isCategory||(f=e._getSnap(n,f));var p=[];if(s.forEach((function(t){t.forEach((function(t){var i=a(t._origin)?t[o]:t._origin[o];e._isEqual(i,f,n)&&p.push(t)}))})),this.hasAdjust("stack")&&i.isPolar&&i.transposed){if(u>=0&&u<=1){var d=r.invert(h.y);d=e._getSnap(r,d,p),p.forEach((function(t){(l(d)?t._originY.toString()===d.toString():t._originY===d)&&c.push(t)}))}}else c=p;return c},i.getRecords=function(t){var e=this,i=this.getXScale(),n=this.get("dataArray"),r=i.field;return n.map((function(n){for(var o=n.length-1;o>=0;o--){var s=n[o],l=a(s._origin)?s[r]:s._origin[r];if(e._isEqual(l,t,i))return s}return null}))},i._isEqual=function(t,e,i){return"timeCat"===i.type?mt(t)===e:e===t},i.position=function(t){return this._setAttrOptions("position",{field:t}),this},i.color=function(t,e){return this._createAttrOption("color",t,e,wt.colors),this},i.size=function(t,e){return this._createAttrOption("size",t,e,wt.sizes),this},i.shape=function(t,e){var i=this.get("type"),n=wt.shapes[i]||[];return this._createAttrOption("shape",t,e,n),this},i.style=function(t,e){var i,n=this.get("styleOptions");return n||(n={},this.set("styleOptions",n)),c(t)&&(e=t,t=null),t&&(i=ie(t)),n.fields=i,n.style=e,this},i.adjust=function(t){return g(t)&&(t={type:t}),this.set("adjust",t),this},i.animate=function(t){return this.set("animateCfg",t),this},i.changeData=function(t){this.set("data",t),this.set("scales",{}),this.get("isInit")&&(this.set("isInit",!1),this.init())},i.clearInner=function(){var t=this.get("container");t&&t.clear()},i.reset=function(){this.set("isInit",!1),this.set("attrs",{}),this.set("attrOptions",{}),this.set("adjust",null),this.clearInner()},i.clear=function(){this.clearInner()},i.destroy=function(){this.set("isInit",!1),this.clear(),t.prototype.destroy.call(this)},i._display=function(t){this.set("visible",t);var e=this.get("container"),i=e.get("canvas");e.set("visible",t),i.draw()},i.show=function(){this._display(!0)},i.hide=function(){this._display(!1)},e}(It),re={};function oe(t){return re[t]}function se(t,e){re[t]=e}var ae=function(){function t(t){this.type="base",this.isCategory=!1,this.isLinear=!1,this.isContinuous=!1,this.isIdentity=!1,this.values=[],this.range=[0,1],this.ticks=[],this.__cfg__=t,this.initCfg(),this.init()}return t.prototype.translate=function(t){return t},t.prototype.change=function(t){O(this.__cfg__,t),this.init()},t.prototype.clone=function(){return this.constructor(this.__cfg__)},t.prototype.getTicks=function(){var t=this;return function(t,e){if(!i(t))return t;for(var n=[],r=0;r<t.length;r++){var o=t[r];n.push(e(o,r))}return n}(this.ticks,(function(e,i){return c(e)?e:{text:t.getText(e,i),tickValue:e,value:t.scale(e)}}))},t.prototype.getText=function(t,e){var i=this.formatter,n=i?i(t,e):t;return a(n)||!s(n.toString)?"":n.toString()},t.prototype.getConfig=function(t){return this.__cfg__[t]},t.prototype.init=function(){O(this,this.__cfg__),this.setDomain(),z(this.getConfig("ticks"))&&(this.ticks=this.calculateTicks())},t.prototype.initCfg=function(){},t.prototype.setDomain=function(){},t.prototype.calculateTicks=function(){var t=this.tickMethod,e=[];if(g(t)){var i=oe(t);if(!i)throw new Error("There is no method to to calculate ticks!");e=i(this)}else s(t)&&(e=t(this));return e},t.prototype.rangeMin=function(){return this.range[0]},t.prototype.rangeMax=function(){return this.range[1]},t.prototype.calcPercent=function(t,e,i){return b(t)?(t-e)/(i-e):NaN},t.prototype.calcValue=function(t,e,i){return e+t*(i-e)},t}(),le=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cat",e.isCategory=!0,e}return F(e,t),e.prototype.buildIndexMap=function(){if(!this.translateIndexMap){this.translateIndexMap=new Map;for(var t=0;t<this.values.length;t++)this.translateIndexMap.set(this.values[t],t)}},e.prototype.translate=function(t){this.buildIndexMap();var e=this.translateIndexMap.get(t);return void 0===e&&(e=b(t)?t:NaN),e},e.prototype.scale=function(t){var e=this.translate(t),i=this.calcPercent(e,this.min,this.max);return this.calcValue(i,this.rangeMin(),this.rangeMax())},e.prototype.invert=function(t){var e=this.max-this.min,i=this.calcPercent(t,this.rangeMin(),this.rangeMax()),n=Math.round(e*i)+this.min;return n<this.min||n>this.max?NaN:this.values[n]},e.prototype.getText=function(e){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var r=e;return b(e)&&!this.values.includes(e)&&(r=this.values[r]),t.prototype.getText.apply(this,j([r],i))},e.prototype.initCfg=function(){this.tickMethod="cat"},e.prototype.setDomain=function(){if(a(this.getConfig("min"))&&(this.min=0),a(this.getConfig("max"))){var t=this.values.length;this.max=t>1?t-1:t}this.translateIndexMap&&(this.translateIndexMap=void 0)},e}(ae),ce=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,he="[^\\s]+",ue=/\[([^]*?)\]/gm;function fe(t,e){for(var i=[],n=0,r=t.length;n<r;n++)i.push(t[n].substr(0,e));return i}var pe=function(t){return function(e,i){var n=i[t].map((function(t){return t.toLowerCase()})).indexOf(e.toLowerCase());return n>-1?n:null}};function de(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];for(var n=0,r=e;n<r.length;n++){var o=r[n];for(var s in o)t[s]=o[s]}return t}var ge=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ve=["January","February","March","April","May","June","July","August","September","October","November","December"],me=fe(ve,3),ye={dayNamesShort:fe(ge,3),dayNames:ge,monthNamesShort:me,monthNames:ve,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!=10?1:0)*t%10]}},xe=de({},ye),be=function(t){return xe=de(xe,t)},Se=function(t){return t.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},we=function(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},ke={D:function(t){return String(t.getDate())},DD:function(t){return we(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return we(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return we(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return we(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return we(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return we(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return we(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return we(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return we(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return we(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return we(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+we(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+we(Math.floor(Math.abs(e)/60),2)+":"+we(Math.abs(e)%60,2)}},Ce=function(t){return+t-1},Te=[null,"[1-9]\\d?"],Pe=[null,he],Me=["isPm",he,function(t,e){var i=t.toLowerCase();return i===e.amPm[0]?0:i===e.amPm[1]?1:null}],_e=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var e=(t+"").match(/([+-]|\d\d)/gi);if(e){var i=60*+e[1]+parseInt(e[2],10);return"+"===e[0]?i:-i}return 0}],Ie={D:["day","[1-9]\\d?"],DD:["day","\\d\\d"],Do:["day","[1-9]\\d?"+he,function(t){return parseInt(t,10)}],M:["month","[1-9]\\d?",Ce],MM:["month","\\d\\d",Ce],YY:["year","\\d\\d",function(t){var e=+(""+(new Date).getFullYear()).substr(0,2);return+(""+(+t>68?e-1:e)+t)}],h:["hour","[1-9]\\d?",void 0,"isPm"],hh:["hour","\\d\\d",void 0,"isPm"],H:["hour","[1-9]\\d?"],HH:["hour","\\d\\d"],m:["minute","[1-9]\\d?"],mm:["minute","\\d\\d"],s:["second","[1-9]\\d?"],ss:["second","\\d\\d"],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(t){return 100*+t}],SS:["millisecond","\\d\\d",function(t){return 10*+t}],SSS:["millisecond","\\d{3}"],d:Te,dd:Te,ddd:Pe,dddd:Pe,MMM:["month",he,pe("monthNamesShort")],MMMM:["month",he,pe("monthNames")],a:Me,A:Me,ZZ:_e,Z:_e},De={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},Oe=function(t){return de(De,t)},Ee=function(t,e,i){if(void 0===e&&(e=De.default),void 0===i&&(i={}),"number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");var n=[];e=(e=De[e]||e).replace(ue,(function(t,e){return n.push(e),"@@@"}));var r=de(de({},xe),i);return(e=e.replace(ce,(function(e){return ke[e](t,r)}))).replace(/@@@/g,(function(){return n.shift()}))};function Ae(t,e,i){if(void 0===i&&(i={}),"string"!=typeof e)throw new Error("Invalid format in fecha parse");if(e=De[e]||e,t.length>1e3)return null;var n={year:(new Date).getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},r=[],o=[],s=e.replace(ue,(function(t,e){return o.push(Se(e)),"@@@"})),a={},l={};s=Se(s).replace(ce,(function(t){var e=Ie[t],i=e[0],n=e[1],o=e[3];if(a[i])throw new Error("Invalid format. "+i+" specified twice in format");return a[i]=!0,o&&(l[o]=!0),r.push(e),"("+n+")"})),Object.keys(l).forEach((function(t){if(!a[t])throw new Error("Invalid format. "+t+" is required in specified format")})),s=s.replace(/@@@/g,(function(){return o.shift()}));var c=t.match(new RegExp(s,"i"));if(!c)return null;for(var h=de(de({},xe),i),u=1;u<c.length;u++){var f=r[u-1],p=f[0],d=f[2],g=d?d(c[u],h):+c[u];if(null==g)return null;n[p]=g}1===n.isPm&&null!=n.hour&&12!=+n.hour?n.hour=+n.hour+12:0===n.isPm&&12==+n.hour&&(n.hour=0);for(var v=new Date(n.year,n.month,n.day,n.hour,n.minute,n.second,n.millisecond),m=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],y=(u=0,m.length);u<y;u++)if(a[m[u][0]]&&n[m[u][0]]!==v[m[u][1]]())return null;return null==n.timezoneOffset?v:new Date(Date.UTC(n.year,n.month,n.day,n.hour,n.minute-n.timezoneOffset,n.second,n.millisecond))}var Be={format:Ee,parse:Ae,defaultI18n:ye,setGlobalDateI18n:be,setGlobalDateMasks:Oe},Ye=Object.freeze({__proto__:null,default:Be,assign:de,format:Ee,parse:Ae,defaultI18n:ye,setGlobalDateI18n:be,setGlobalDateMasks:Oe});function ze(t,e){return(Ye.format||Be.format)(t,e)}function Ne(t){return g(t)&&(t=t.indexOf("T")>0?new Date(t).getTime():new Date(t.replace(/-/gi,"/")).getTime()),_(t)&&(t=t.getTime()),t}var He=36e5,Le=24*He,Xe=31*Le,Fe=[["HH:mm:ss",1e3],["HH:mm:ss",1e4],["HH:mm:ss",3e4],["HH:mm",6e4],["HH:mm",6e5],["HH:mm",18e5],["HH",He],["HH",6*He],["HH",12*He],["YYYY-MM-DD",Le],["YYYY-MM-DD",4*Le],["YYYY-WW",7*Le],["YYYY-MM",Xe],["YYYY-MM",4*Xe],["YYYY-MM",6*Xe],["YYYY",380*Le]];function je(t,e,i){var n,r=(n=function(t){return t[1]},function(t,e,i,r){for(var o=a(i)?0:i,s=a(r)?t.length:r;o<s;){var l=o+s>>>1;n(t[l])>e?s=l:o=l+1}return o})(Fe,(e-t)/i)-1,o=Fe[r];return r<0?o=Fe[0]:r>=Fe.length&&(o=y(Fe)),o}var Re=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="timeCat",e}return F(e,t),e.prototype.translate=function(t){t=Ne(t);var e=this.values.indexOf(t);return-1===e&&(e=b(t)&&t<this.values.length?t:NaN),e},e.prototype.getText=function(t,e){var i=this.translate(t);if(i>-1){var n=this.values[i],r=this.formatter;return n=r?r(n,e):ze(n,this.mask)}return t},e.prototype.initCfg=function(){this.tickMethod="time-cat",this.mask="YYYY-MM-DD",this.tickCount=7},e.prototype.setDomain=function(){var e=this.values;h(e,(function(t,i){e[i]=Ne(t)})),e.sort((function(t,e){return t-e})),t.prototype.setDomain.call(this)},e}(le),$e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isContinuous=!0,e}return F(e,t),e.prototype.scale=function(t){if(a(t))return NaN;var e=this.rangeMin(),i=this.rangeMax();return this.max===this.min?e:e+this.getScalePercent(t)*(i-e)},e.prototype.init=function(){t.prototype.init.call(this);var e=this.ticks,i=m(e),n=y(e);i<this.min&&(this.min=i),n>this.max&&(this.max=n),a(this.minLimit)||(this.min=i),a(this.maxLimit)||(this.max=n)},e.prototype.setDomain=function(){var t=d(this.values),e=t.min,i=t.max;a(this.min)&&(this.min=e),a(this.max)&&(this.max=i),this.min>this.max&&(this.min=e,this.max=i)},e.prototype.calculateTicks=function(){var e=this,i=t.prototype.calculateTicks.call(this);return this.nice||(i=n(i,(function(t){return t>=e.min&&t<=e.max}))),i},e.prototype.getScalePercent=function(t){var e=this.max,i=this.min;return(t-i)/(e-i)},e.prototype.getInvertPercent=function(t){return(t-this.rangeMin())/(this.rangeMax()-this.rangeMin())},e}(ae),We=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="linear",e.isLinear=!0,e}return F(e,t),e.prototype.invert=function(t){var e=this.getInvertPercent(t);return this.min+e*(this.max-this.min)},e.prototype.initCfg=function(){this.tickMethod="wilkinson-extended",this.nice=!1},e}($e);function Ge(t,e){var i=Math.E;return e>=0?Math.pow(i,Math.log(e)/t):-1*Math.pow(i,Math.log(-e)/t)}function Ve(t,e){return 1===t?1:Math.log(e)/Math.log(t)}function qe(t,e,i){a(i)&&(i=Math.max.apply(null,t));var n=i;return h(t,(function(t){t>0&&t<n&&(n=t)})),n===i&&(n=i/e),n>1&&(n=1),n}var Ue=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e}return F(e,t),e.prototype.invert=function(t){var e,i=this.base,n=Ve(i,this.max),r=this.rangeMin(),o=this.rangeMax()-r,s=this.positiveMin;if(s){if(0===t)return 0;var a=1/(n-(e=Ve(i,s/i)))*o;if(t<a)return t/a*s}else e=Ve(i,this.min);var l=(t-r)/o*(n-e)+e;return Math.pow(i,l)},e.prototype.initCfg=function(){this.tickMethod="log",this.base=10,this.tickCount=6,this.nice=!0},e.prototype.setDomain=function(){t.prototype.setDomain.call(this);var e=this.min;if(e<0)throw new Error("When you use log scale, the minimum value must be greater than zero!");0===e&&(this.positiveMin=qe(this.values,this.base,this.max))},e.prototype.getScalePercent=function(t){var e=this.max,i=this.min;if(e===i)return 0;if(t<=0)return 0;var n=this.base,r=this.positiveMin;return r&&(i=1*r/n),t<r?t/r/(Ve(n,e)-Ve(n,i)):(Ve(n,t)-Ve(n,i))/(Ve(n,e)-Ve(n,i))},e}($e),Ke=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pow",e}return F(e,t),e.prototype.invert=function(t){var e=this.getInvertPercent(t),i=this.exponent,n=Ge(i,this.max),r=Ge(i,this.min),o=e*(n-r)+r,s=o>=0?1:-1;return Math.pow(o,i)*s},e.prototype.initCfg=function(){this.tickMethod="pow",this.exponent=2,this.tickCount=5,this.nice=!0},e.prototype.getScalePercent=function(t){var e=this.max,i=this.min;if(e===i)return 0;var n=this.exponent;return(Ge(n,t)-Ge(n,i))/(Ge(n,e)-Ge(n,i))},e}($e),Ze=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="time",e}return F(e,t),e.prototype.getText=function(t,e){var i=this.translate(t),n=this.formatter;return n?n(i,e):ze(i,this.mask)},e.prototype.scale=function(e){var i=e;return(g(i)||_(i))&&(i=this.translate(i)),t.prototype.scale.call(this,i)},e.prototype.translate=function(t){return Ne(t)},e.prototype.initCfg=function(){this.tickMethod="time-pretty",this.mask="YYYY-MM-DD",this.tickCount=7,this.nice=!1},e.prototype.setDomain=function(){var t=this.values,e=this.getConfig("min"),i=this.getConfig("max");if(a(e)&&b(e)||(this.min=this.translate(this.min)),a(i)&&b(i)||(this.max=this.translate(this.max)),t&&t.length){var n=[],r=1/0,o=r,s=0;h(t,(function(t){var e=Ne(t);if(isNaN(e))throw new TypeError("Invalid Time: "+t+" in time scale!");r>e?(o=r,r=e):o>e&&(o=e),s<e&&(s=e),n.push(e)})),t.length>1&&(this.minTickInterval=o-r),a(e)&&(this.min=r),a(i)&&(this.max=s)}},e}(We),Qe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="quantize",e}return F(e,t),e.prototype.invert=function(t){var e=this.ticks,i=e.length,n=this.getInvertPercent(t),r=Math.floor(n*(i-1));if(r>=i-1)return y(e);if(r<0)return m(e);var o=e[r],s=r/(i-1);return o+(n-s)/((r+1)/(i-1)-s)*(e[r+1]-o)},e.prototype.initCfg=function(){this.tickMethod="r-pretty",this.tickCount=5,this.nice=!0},e.prototype.calculateTicks=function(){var e=t.prototype.calculateTicks.call(this);return this.nice||(y(e)!==this.max&&e.push(this.max),m(e)!==this.min&&e.unshift(this.min)),e},e.prototype.getScalePercent=function(t){var e=this.ticks;if(t<m(e))return 0;if(t>y(e))return 1;var i=0;return h(e,(function(e,n){if(!(t>=e))return!1;i=n})),i/(e.length-1)},e}($e),Je=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="quantile",e}return F(e,t),e.prototype.initCfg=function(){this.tickMethod="quantile",this.tickCount=5,this.nice=!0},e}(Qe),ti={};function ei(t){return ti[t]}function ii(t,e){if(ei(t))throw new Error("type '"+t+"' existed.");ti[t]=e}var ni=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="identity",e.isIdentity=!0,e}return F(e,t),e.prototype.calculateTicks=function(){return this.values},e.prototype.scale=function(t){return this.values[0]!==t&&b(t)?t:this.range[0]},e.prototype.invert=function(t){var e=this.range;return t<e[0]||t>e[1]?NaN:this.values[0]},e}(ae),ri=[1,5,2,2.5,4,3],oi=100*Number.EPSILON;function si(t,e,i,n,r,o){var s=H(e),a=B(e,t),l=0,c=function(t,e){return(t%e+e)%e}(n,o);return(c<oi||o-c<oi)&&n<=0&&r>=0&&(l=1),1-a/(s-1)-i+l}function ai(t,e,i){var n=H(e);return 1-B(e,t)/(n-1)-i+1}function li(t,e,i,n,r,o){var s=(t-1)/(o-r),a=(e-1)/(Math.max(o,n)-Math.min(i,r));return 2-Math.max(s/a,a/s)}function ci(t,e){return t>=e?2-(t-1)/(e-1):1}function hi(t,e,i,n){var r=e-t;return 1-.5*(Math.pow(e-n,2)+Math.pow(t-i,2))/Math.pow(.1*r,2)}function ui(t,e,i){var n=e-t;if(i>n){var r=(i-n)/2;return 1-Math.pow(r,2)/Math.pow(.1*n,2)}return 1}function fi(t,e,i,n,r,o){if(void 0===i&&(i=5),void 0===n&&(n=!0),void 0===r&&(r=ri),void 0===o&&(o=[.25,.2,.5,.05]),Number.isNaN(t)||Number.isNaN(e)||"number"!=typeof t||"number"!=typeof e||!i)return{min:0,max:0,ticks:[]};if(e-t<1e-15||1===i)return{min:t,max:e,ticks:[t]};for(var s={score:-2,lmin:0,lmax:0,lstep:0},a=1;a<1/0;){for(var l=0;l<r.length;l+=1){var c=r[l],h=ai(c,r,a);if(o[0]*h+o[1]+o[2]+o[3]<s.score){a=1/0;break}for(var u=2;u<1/0;){var f=ci(u,i);if(o[0]*h+o[1]+o[2]*f+o[3]<s.score)break;for(var p=(e-t)/(u+1)/a/c,d=Math.ceil(Math.log10(p));d<1/0;){var g=a*c*Math.pow(10,d),v=ui(t,e,g*(u-1));if(o[0]*h+o[1]*v+o[2]*f+o[3]<s.score)break;var x=Math.floor(e/g)*a-(u-1)*a,b=Math.ceil(t/g)*a;if(x<=b)for(var S=b-x,w=0;w<=S;w+=1){var k=(x+w)*(g/a),C=k+g*(u-1),T=g,P=si(c,r,a,k,C,T),M=hi(t,e,k,C),_=li(u,i,t,e,k,C),I=o[0]*P+o[1]*M+o[2]*_+1*o[3];I>s.score&&(!n||k<=t&&C>=e)&&(s.lmin=k,s.lmax=C,s.lstep=T,s.score=I)}d+=1}u+=1}}a+=1}var D,O=s.lmax,E=s.lmin,A=s.lstep,B=Math.floor((O-E)/A)+1,Y=new Array(B);for(l=0;l<B;l++)Y[l]=(D=E+l*A)<1e-15?D:parseFloat(D.toFixed(15));return{min:Math.min(t,m(Y)),max:Math.max(e,y(Y)),ticks:Y}}function pi(t){var e=t.values,i=t.tickInterval,r=t.tickCount,o=e;if(b(i))return n(o,(function(t,e){return e%i==0}));var s=t.min,l=t.max;if(a(s)&&(s=0),a(l)&&(l=e.length-1),b(r)&&r<l-s){var c=fi(s,l,r,!1,[1,2,5,3,4,7,6,8,9]).ticks;return n(c,(function(t){return t>=s&&t<=l})).map((function(t){return e[t]}))}return e.slice(s,l+1)}var di=Math.sqrt(50),gi=Math.sqrt(10),vi=Math.sqrt(2),mi=function(){function t(){this._domain=[0,1]}return t.prototype.domain=function(t){return t?(this._domain=Array.from(t,Number),this):this._domain.slice()},t.prototype.nice=function(t){var e,i;void 0===t&&(t=5);var n,r=this._domain.slice(),o=0,s=this._domain.length-1,a=this._domain[o],l=this._domain[s];return l<a&&(a=(e=[l,a])[0],l=e[1],o=(i=[s,o])[0],s=i[1]),(n=yi(a,l,t))>0?n=yi(a=Math.floor(a/n)*n,l=Math.ceil(l/n)*n,t):n<0&&(n=yi(a=Math.ceil(a*n)/n,l=Math.floor(l*n)/n,t)),n>0?(r[o]=Math.floor(a/n)*n,r[s]=Math.ceil(l/n)*n,this.domain(r)):n<0&&(r[o]=Math.ceil(a*n)/n,r[s]=Math.floor(l*n)/n,this.domain(r)),this},t.prototype.ticks=function(t){return void 0===t&&(t=5),function(t,e,i){var n,r,o,s,a=-1;if(i=+i,(t=+t)==(e=+e)&&i>0)return[t];if((n=e<t)&&(r=t,t=e,e=r),0===(s=yi(t,e,i))||!isFinite(s))return[];if(s>0)for(t=Math.ceil(t/s),e=Math.floor(e/s),o=new Array(r=Math.ceil(e-t+1));++a<r;)o[a]=(t+a)*s;else for(t=Math.floor(t*s),e=Math.ceil(e*s),o=new Array(r=Math.ceil(t-e+1));++a<r;)o[a]=(t-a)/s;return n&&o.reverse(),o}(this._domain[0],this._domain[this._domain.length-1],t||5)},t}();function yi(t,e,i){var n=(e-t)/Math.max(0,i),r=Math.floor(Math.log(n)/Math.LN10),o=n/Math.pow(10,r);return r>=0?(o>=di?10:o>=gi?5:o>=vi?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=di?10:o>=gi?5:o>=vi?2:1)}function xi(t,e,i){return("ceil"===i?Math.ceil(t/e):"floor"===i?Math.floor(t/e):Math.round(t/e))*e}function bi(t,e,i){var n=xi(t,i,"floor"),r=xi(e,i,"ceil");n=x(n,i),r=x(r,i);for(var o=[],s=n;s<=r;s+=i){var a=x(s,i);o.push(a)}return{min:n,max:r,ticks:o}}function Si(t,e,i){var n,r=t.minLimit,o=t.maxLimit,s=t.min,l=t.max,c=t.tickCount,h=void 0===c?5:c,u=a(r)?a(e)?s:e:r,f=a(o)?a(i)?l:i:o;if(u>f&&(f=(n=[u,f])[0],u=n[1]),h<=2)return[u,f];for(var p=(f-u)/(h-1),d=[],g=0;g<h;g++)d.push(u+p*g);return d}function wi(t){return t<1e-15?t:parseFloat(t.toFixed(15))}function ki(t,e,i){if(void 0===i&&(i=5),t===e)return{max:e,min:t,ticks:[t]};var n=(e-t)/i,r=Math.pow(10,Math.floor(Math.log10(n))),o=r;2*r-n<1.5*(n-o)&&5*r-n<2.75*(n-(o=2*r))&&10*r-n<1.5*(n-(o=5*r))&&(o=10*r);for(var s=Math.ceil(e/o),a=Math.floor(t/o),l=Math.max(s*o,e),c=Math.min(a*o,t),h=Math.floor((l-c)/o)+1,u=new Array(h),f=0;f<h;f++)u[f]=wi(c+f*o);return{min:c,max:l,ticks:u}}function Ci(t,e){var i=t.length*e;return 1===e?t[t.length-1]:0===e?t[0]:i%1!=0?t[Math.ceil(i)-1]:t.length%2==0?(t[i-1]+t[i])/2:t[i]}function Ti(t){return new Date(t).getFullYear()}function Pi(t){return new Date(t,0,1).getTime()}function Mi(t){return new Date(t).getMonth()}function _i(t,e){return new Date(t,e,1).getTime()}se("cat",pi),se("time-cat",(function(t){var e=pi(t),i=y(t.values);return i!==y(e)&&e.push(i),e})),se("wilkinson-extended",(function(t){var e=t.min,i=t.max,n=t.tickCount,r=t.nice,o=t.tickInterval,s=t.minLimit,l=t.maxLimit,c=fi(e,i,n,r).ticks;return a(s)&&a(l)?o?bi(e,i,o).ticks:c:Si(t,m(c),y(c))})),se("r-pretty",(function(t){var e=t.min,i=t.max,n=t.tickCount,r=t.tickInterval,o=t.minLimit,s=t.maxLimit,l=ki(e,i,n).ticks;return a(o)&&a(s)?r?bi(e,i,r).ticks:l:Si(t,m(l),y(l))})),se("time",(function(t){var e=t.min,i=t.max,n=t.minTickInterval,r=t.tickInterval,o=t.tickCount;if(r)o=Math.ceil((i-e)/r);else{var s=(i-e)/(r=je(e,i,o)[1])/o;s>1&&(r*=Math.ceil(s)),n&&r<n&&(r=n)}for(var a=[],l=e;l<i+r;l+=r)a.push(l);return a})),se("time-pretty",(function(t){var e=t.min,i=t.max,n=t.minTickInterval,r=t.tickCount,o=t.tickInterval,s=[];o||(o=(i-e)/r,n&&o<n&&(o=n));var a=Ti(e);if(o>31536e6)for(var l=Ti(i),c=Math.ceil(o/31536e6),h=a;h<=l+c;h+=c)s.push(Pi(h));else if(o>Xe){var u=Math.ceil(o/Xe),f=Mi(e),p=function(t,e){var i=Ti(t),n=Ti(e),r=Mi(t);return 12*(n-i)+(Mi(e)-r)%12}(e,i);for(h=0;h<=p+u;h+=u)s.push(_i(a,h+f))}else if(o>Le){var d=(x=new Date(e)).getFullYear(),g=x.getMonth(),v=x.getDate(),m=Math.ceil(o/Le),y=function(t,e){return Math.ceil((e-t)/Le)}(e,i);for(h=0;h<y+m;h+=m)s.push(new Date(d,g,v+h).getTime())}else if(o>He){d=(x=new Date(e)).getFullYear(),g=x.getMonth(),m=x.getDate();var x,b=x.getHours(),S=Math.ceil(o/He),w=function(t,e){return Math.ceil((e-t)/He)}(e,i);for(h=0;h<=w+S;h+=S)s.push(new Date(d,g,m,b+h).getTime())}else if(o>6e4){var k=function(t,e){return Math.ceil((e-t)/6e4)}(e,i),C=Math.ceil(o/6e4);for(h=0;h<=k+C;h+=C)s.push(e+6e4*h)}else{var T=o;T<1e3&&(T=1e3);var P=1e3*Math.floor(e/1e3),M=Math.ceil((i-e)/1e3),_=Math.ceil(T/1e3);for(h=0;h<M+_;h+=_)s.push(P+1e3*h)}return s.length>=512&&console.warn("Notice: current ticks length("+s.length+') >= 512, may cause performance issues, even out of memory. Because of the configure "tickInterval"(in milliseconds, current is '+o+") is too small, increase the value to solve the problem!"),s})),se("log",(function(t){var e,i=t.base,n=t.tickCount,r=t.min,o=t.max,s=t.values,a=Ve(i,o);if(r>0)e=Math.floor(Ve(i,r));else{var l=qe(s,i,o);e=Math.floor(Ve(i,l))}for(var c=a-e,h=Math.ceil(c/n),u=[],f=e;f<a+h;f+=h)u.push(Math.pow(i,f));return r<=0&&u.unshift(0),u})),se("pow",(function(t){var e=t.exponent,i=t.tickCount,n=Math.ceil(Ge(e,t.max));return ki(Math.floor(Ge(e,t.min)),n,i).ticks.map((function(t){var i=t>=0?1:-1;return Math.pow(t,e)*i}))})),se("quantile",(function(t){var e=t.tickCount,i=t.values;if(!i||!i.length)return[];for(var n=i.slice().sort((function(t,e){return t-e})),r=[],o=0;o<e;o++){var s=o/(e-1);r.push(Ci(n,s))}return r})),se("d3-linear",(function(t){var e=t.min,i=t.max,n=t.tickInterval,r=t.minLimit,o=t.maxLimit,s=function(t){var e=t.min,i=t.max,n=t.nice,r=t.tickCount,o=new mi;return o.domain([e,i]),n&&o.nice(r),o.ticks(r)}(t);return a(r)&&a(o)?n?bi(e,i,n).ticks:s:Si(t,m(s),y(s))})),ii("cat",le),ii("category",le),ii("identity",ni),ii("linear",We),ii("log",Ue),ii("pow",Ke),ii("time",Ze),ii("timeCat",Re),ii("quantize",Qe),ii("quantile",Je);var Ii=function(t){var e=t.values,i=t.tickCount;if(!i)return e;if(e.length<=1)return e;for(var n=parseInt(e.length/(i-1))||1,r=[],o=0;o<e.length;o+=n)r.push(e[o]);var s=e[e.length-1];return r[r.length-1]!==s&&(r.length>=i?r[r.length-1]=s:r.push(s)),r},Di=[1,1.2,1.5,2,2.2,2.4,2.5,3,4,5,6,7.5,8,10];function Oi(t){var e=1;if(0===(t=Math.abs(t)))return e;if(t<1){for(var i=0;t<1;)e/=10,t*=10,i++;return e.toString().length>12&&(e=parseFloat(e.toFixed(i))),e}for(;t>10;)e*=10,t/=10;return e}function Ei(t){var e=t.interval,i=t.tickCount,n=t.max,r=t.min;return Math.floor(r/e)*e+(i-1)*e>=n}function Ai(t){var e=t.toString(),i=e.indexOf("."),n=e.indexOf("e-"),r=n>=0?parseInt(e.substr(n+2),10):e.substr(i+1).length;return r>20&&(r=20),r}function Bi(t,e){return parseFloat(t.toFixed(e))}var Yi=ei("linear"),zi=ei("identity"),Ni=ei("category"),Hi=ei("timeCat");function Li(t){Object.keys(t).forEach((function(e){delete t[e]}))}se("cat",Ii),se("time-cat",Ii),se("wilkinson-extended",(function(t){var e=t||{},i=e.tickCount,n=e.tickInterval,r=t||{},o=r.min,s=r.max;o=isNaN(o)?0:o,s=isNaN(s)?0:s;var a=i&&i>=2?i:5,l=n||function(t){var e=t.tickCount,i=t.min,n=t.max;if(i===n)return 1*Oi(n);for(var r=(n-i)/(e-1),o=Oi(r),s=r/o,a=n/o,l=i/o,c=0,h=0;h<Di.length;h++)if(s<=Di[h]){c=h;break}var u=function t(e,i,n,r){for(var o=!1,s=Di[e],a=e;a<Di.length;a++)if(Ei({interval:Di[a],tickCount:i,max:r,min:n})){s=Di[a],o=!0;break}return o?s:10*t(0,i,n/10,r/10)}(c,e,l,a),f=Ai(u)+Ai(o);return Bi(u*o,f)}({tickCount:a,max:s,min:o}),c=Math.floor(o/l)*l;if(n){var h=Math.abs(Math.ceil((s-c)/n))+1;a=Math.max(a,h)}for(var u=[],f=0,p=Ai(l);f<a;)u.push(Bi(c+f*l,p)),f++;return u})),ae.Linear=Yi,ae.Identity=zi,ae.Category=Ni,ae.Cat=Ni,ae.TimeCat=Hi;var Xi=function(){function t(t){this.defs={},this.scales={},O(this,t)}var e=t.prototype;return e.setFieldDef=function(t,e){var i=this.defs;c(t)?O(i,t):i[t]=e,this.updateScales()},e._getDef=function(t){var e=this.defs,i=null;return(wt.scales[t]||e[t])&&(i=O({},wt.scales[t]),h(e[t],(function(t,e){a(t)?delete i[e]:i[e]=t}))),i},e._getDefaultType=function(t,e,i){if(i&&i.type)return i.type;var n="linear",r=W(e,t);return l(r)&&(r=r[0]),g(r)&&(n="cat"),n},e._getScaleDef=function(t,e,i,n){var r,o={field:e,values:r=n&&n.values?n.values:$(i,e)};if("cat"!==t&&"timeCat"!==t){if(!n||!n.min||!n.max){var s=U(r),a=s.min,l=s.max;o.min=a,o.max=l,o.nice=!0}}else o.isRounding=!1;return o},e._adjustRange=function(t,e){var i=e.range,n=e.values;if("linear"===t||i||!n)return e;var r=n.length;if(1===r)e.range=[.5,1];else{var o=this.chart.get("coord"),s=wt.widthRatio.multiplePie,l=0;!function(t){if(!t.isPolar)return!1;var e=t.startAngle,i=t.endAngle;return!(!a(e)&&!a(i)&&i-e<2*Math.PI)}(o)?(l=1/r*.5,e.range=[l,1-l]):o.transposed?(l=1/r*s,e.range=[l/2,1-l/2]):e.range=[0,1-1/r]}return e},e._getScaleCfg=function(t,e){var i=this._getDef(t);if(!e||!e.length)return i&&i.type?(i.field=t,{type:i.type,cfg:i}):{type:"identity",cfg:{value:t,field:t.toString(),values:[t]}};var n=e[0][t];if(null===n&&(n=W(e,t)),b(t)||a(n)&&!i)return{type:"identity",cfg:{value:t,field:t.toString(),values:[t]}};var r=this._getDefaultType(t,e,i),o=this._getScaleDef(r,t,e,i);return i&&O(o,i),{type:r,cfg:o=this._adjustRange(r,o)}},e.createScale=function(t,e){var i=this.scales,n=this._getScaleCfg(t,e),r=n.type,o=n.cfg,s=i[t];if(s&&s.type===r)return s.change(o),s;var a=new(ei(r))(o);return i[t]=a,a},e._updateScale=function(t){var e=t.field,i=this.chart._getScaleData(e),n=this._getScaleCfg(e,i).cfg;t.change(n)},e.updateScales=function(){var t=this;h(this.scales,(function(e){t._updateScale(e)}))},e.adjustStartZero=function(t){var e=this.defs,i=t.field,n=t.min,r=t.max;e[i]&&e[i].min||(n>0?t.change({min:0}):r<0&&t.change({max:0}))},e.clear=function(){Li(this.defs),Li(this.scales),this.data=null},t}(),Fi=function(){var t=e.prototype;function e(t){this._initDefaultCfg(),O(this,t),this.draw()}return t._initDefaultCfg=function(){this.ticks=[],this.tickLine={},this.offsetFactor=1,this.frontContainer=null,this.backContainer=null,this.gridPoints=[]},t.draw=function(){var t=this.line,e=this.tickLine,i=this.label,n=this.grid;n&&this.drawGrid(n),e&&this.drawTicks(e),t&&this.drawLine(t),i&&this.drawLabels()},t.drawTicks=function(t){var e=this,i=e.ticks,n=t.length,r=e.getContainer(t.top);h(i,(function(i){var o=e.getOffsetPoint(i.value),s=e.getSidePoint(o,n);r.addShape("line",{className:"axis-tick",attrs:O({x1:o.x,y1:o.y,x2:s.x,y2:s.y},t)})._id=e._id+"-ticks"}))},t.drawLabels=function(){var t=this,e=t.labelOffset;h(t.labels,(function(i){var n=t.getContainer(i.get("top")),r=t.getOffsetPoint(i.get("value")),o=t.getSidePoint(r,e),s=o.x,a=o.y;i.attr(O({x:s,y:a},t.getTextAlignInfo(r,e),i.get("textStyle"))),i._id=t._id+"-"+i.attr("text"),n.add(i)}))},t.drawLine=function(){},t.drawGrid=function(t){var e=this,i=e.gridPoints,n=e.ticks,r=t,o=i.length;h(i,(function(i,a){if(s(t)){var l=n[a]||{},c=t(l.text,a,o);r=c?O({},wt._defaultAxis.grid,c):null}if(r){var h,u=r.type,f=i.points,p=e.getContainer(r.top);if("arc"===u){var d=e.center,g=e.startAngle,v=e.endAngle,m=Et.length([f[0].x-d.x,f[0].y-d.y]);h=p.addShape("Arc",{className:"axis-grid",attrs:O({x:d.x,y:d.y,startAngle:g,endAngle:v,r:m},r)})}else h=p.addShape("Polyline",{className:"axis-grid",attrs:O({points:f},r)});h._id=i._id}}))},t.getOffsetPoint=function(){},t.getAxisVector=function(){},t.getOffsetVector=function(t,e){var i=this.getAxisVector(t),n=Et.normalize([],i),r=this.offsetFactor,o=[-1*n[1]*r,n[0]*r];return Et.scale([],o,e)},t.getSidePoint=function(t,e){var i=this.getOffsetVector(t,e);return{x:t.x+i[0],y:t.y+i[1]}},t.getTextAlignInfo=function(t,e){var i=this.getOffsetVector(t,e);return{textAlign:i[0]>0?"left":i[0]<0?"right":"center",textBaseline:i[1]>0?"top":i[1]<0?"bottom":"middle"}},t.getContainer=function(t){var e=this.frontContainer,i=this.backContainer;return t?e:i},e}(),ji=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initDefaultCfg=function(){t.prototype._initDefaultCfg.call(this),this.start=null,this.end=null},i.getOffsetPoint=function(t){var e=this.start,i=this.end;return{x:e.x+(i.x-e.x)*t,y:e.y+(i.y-e.y)*t}},i.getAxisVector=function(){var t=this.start,e=this.end;return[e.x-t.x,e.y-t.y]},i.drawLine=function(t){var e=this.getContainer(t.top),i=this.start,n=this.end;e.addShape("line",{className:"axis-line",attrs:O({x1:i.x,y1:i.y,x2:n.x,y2:n.y},t)})},e}(Fi);Fi.Line=ji;var Ri=function(){function t(t){this.axisCfg={},this.frontPlot=null,this.backPlot=null,this.axes={},O(this,t)}var e=t.prototype;return e._isHide=function(t){var e=this.axisCfg;return!e||!1===e[t]},e._getLinePosition=function(t,e,i,n){var r="",o=t.field,s=this.axisCfg;return s[o]&&s[o].position?r=s[o].position:"x"===e?r=n?"left":"bottom":"y"===e&&(r=i?"right":"left",n&&(r="bottom")),r},e._getLineCfg=function(t,e,i){var n,r,o=1;return"x"===e?(n={x:0,y:0},r={x:1,y:0}):"right"===i?(n={x:1,y:0},r={x:1,y:1}):(n={x:0,y:0},r={x:0,y:1},o=-1),t.transposed&&(o*=-1),{offsetFactor:o,start:t.convertPoint(n),end:t.convertPoint(r)}},e._getCircleCfg=function(t){return{startAngle:t.startAngle,endAngle:t.endAngle,center:t.center,radius:t.circleRadius}},e._getRadiusCfg=function(t){var e,i;return t.transposed?(e={x:0,y:0},i={x:1,y:0}):(e={x:0,y:0},i={x:0,y:1}),{offsetFactor:-1,start:t.convertPoint(e),end:t.convertPoint(i)}},e._getAxisCfg=function(t,e,i,n,r){var o=this,a=this,l=this.axisCfg,c=e.getTicks(),u=A({ticks:c,frontContainer:this.frontPlot,backContainer:this.backPlot},r,l[e.field]),f=[],p=u.label,d=c.length,g=0,v=0,m=p;return h(c,(function(t,e){if(s(p)){var i=p(t.text,e,d);m=i?O({},wt._defaultAxis.label,i):null}if(m){var n={};m.textAlign&&(n.textAlign=m.textAlign),m.textBaseline&&(n.textBaseline=m.textBaseline);var r=(m.top?o.frontPlot:o.backPlot).addShape("text",{className:"axis-label",aria:!1,attrs:O({x:0,y:0,text:t.text,fontFamily:a.chart.get("canvas").get("fontFamily")},m),value:t.value,textStyle:n,top:m.top,context:a.chart.get("canvas").get("context")});f.push(r);var l=r.getBBox(),c=l.width,h=l.height;g=Math.max(g,c),v=Math.max(v,h)}})),u.labels=f,u.maxWidth=g,u.maxHeight=v,u},e._createAxis=function(t,e,i,n,r){void 0===r&&(r="");var o,s,a,l=t.type,c=t.transposed;if("cartesian"===l||"rect"===l){var h=this._getLinePosition(e,n,r,c);(a=wt.axis[h]).position=h,o="Line",s=h}else"x"===n&&!c||"y"===n&&c?(a=wt.axis.circle,o="Circle",s="circle"):(a=wt.axis.radius,o="Line",s="radius");var u=this._getAxisCfg(t,e,i,n,a);u.type=o,u.dimType=n,u.verticalScale=i,u.index=r,this.axes[s]=u},e.createAxis=function(t,e,i){var n=this;e&&!n._isHide(e.field)&&n._createAxis(t,e,i[0],"x"),h(i,(function(i,r){n._isHide(i.field)||n._createAxis(t,i,e,"y",r)}));var r=this.axes,o=n.chart;if(o._isAutoPadding()){var s=gt(o.get("padding")),l=gt(o.get("appendPadding")),c=o.get("legendRange")||{top:0,right:0,bottom:0,left:0},u=["auto"===s[0]?c.top+2*l[0]:s[0],"auto"===s[1]?c.right+l[1]:s[1],"auto"===s[2]?c.bottom+l[2]:s[2],"auto"===s[3]?c.left+l[3]:s[3]];if(t.isPolar){var f=r.circle;if(f){var p=f.maxHeight,d=f.maxWidth,g=f.labelOffset;u[0]+=p+g,u[1]+=d+g,u[2]+=p+g,u[3]+=d+g}}else{if(r.right&&"auto"===s[1]){var v=r.right,m=v.maxWidth,y=v.labelOffset;u[1]+=m+y}if(r.left&&"auto"===s[3]){var x=r.left,b=x.maxWidth,S=x.labelOffset;u[3]+=b+S}if(r.bottom&&"auto"===s[2]){var w=r.bottom,k=w.maxHeight,C=w.labelOffset;u[2]+=k+C}}o.set("_padding",u),o._updateLayout(u)}h(r,(function(e){var i,r=e.type,o=e.grid,s=e.verticalScale,l=e.ticks,c=e.dimType,u=e.position,f=e.index;if(t.isPolar?"Line"===r?i=n._getRadiusCfg(t):"Circle"===r&&(i=n._getCircleCfg(t)):i=n._getLineCfg(t,c,u),o&&s){var p=[],d=function(t){var e=t.slice(0);if(e.length>0){var i=e[0],n=e[e.length-1];0!==i.value&&e.unshift({value:0}),1!==n.value&&e.push({value:1})}return e}(s.getTicks());h(l,(function(e){var i=[];h(d,(function(n){var r="x"===c?e.value:n.value,o="x"===c?n.value:e.value;if(r>=0&&r<=1&&o>=0&&o<=1){var s=t.convertPoint({x:r,y:o});i.push(s)}})),p.push({points:i,_id:"axis-"+c+f+"-grid-"+e.tickValue})})),e.gridPoints=p,t.isPolar&&(e.center=t.center,e.startAngle=t.startAngle,e.endAngle=t.endAngle)}i._id="axis-"+c,a(f)||(i._id="axis-"+c+f),new Fi[r](O(e,i))}))},e.clear=function(){this.axes={},this.frontPlot.clear(),this.backPlot.clear()},t}(),$i=function(t,e){var i=e.x-t.x,n=e.y-t.y;return Math.abs(i)>Math.abs(n)?i>0?"right":"left":n>0?"down":"up"},Wi=function(t,e){var i=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);return Math.sqrt(i*i+n*n)},Gi=function(){function t(t){var e=this,i=t.canvas,n=t.el;kt(this,"_click",(function(t){var i=ft(t,e.canvas);t.points=i,e.emitEvent("click",t)})),kt(this,"_start",(function(t){var i,n,r=ft(t,e.canvas);r&&(t.points=r,e.emitEvent("touchstart",t),e.reset(),e.startTime=Date.now(),e.startPoints=r,r.length>1?(e.startDistance=Wi(r[0],r[1]),e.center=(i=r[0],n=r[1],{x:i.x+(n.x-i.x)/2,y:i.y+(n.y-i.y)/2})):e.pressTimeout=setTimeout((function(){t.direction="none",e.emitStart("press",t),e.emitEvent("press",t),e.eventType="press",e.direction="none"}),250))})),kt(this,"_move",(function(t){var i=ft(t,e.canvas);if(i){e.clearPressTimeout(),t.points=i,e.emitEvent("touchmove",t);var n=e.startPoints;if(n)if(i.length>1){var r=e.startDistance,o=Wi(i[0],i[1]);t.zoom=o/r,t.center=e.center,e.emitStart("pinch",t),e.emitEvent("pinch",t)}else{var s=i[0].x-n[0].x,a=i[0].y-n[0].y,l=e.direction||$i(n[0],i[0]);e.direction=l;var c=e.getEventType(i);t.direction=l,t.deltaX=s,t.deltaY=a,e.emitStart(c,t),e.emitEvent(c,t);var h=e.lastMoveTime,u=Date.now();u-h>0&&(e.prevMoveTime=h,e.prevMovePoints=e.lastMovePoints,e.lastMoveTime=u,e.lastMovePoints=i)}}})),kt(this,"_end",(function(t){var i=ft(t,e.canvas);t.points=i,e.emitEnd(t),e.emitEvent("touchend",t);var n=e.lastMoveTime;if(Date.now()-n<100){var r=n-(e.prevMoveTime||e.startTime);if(r>0){var o=e.prevMovePoints||e.startPoints,s=e.lastMovePoints,a=Wi(o[0],s[0])/r;a>.3&&(t.velocity=a,t.direction=$i(o[0],s[0]),e.emitEvent("swipe",t))}}e.reset();var l=t.touches;l&&l.length>0&&e._start(t)})),kt(this,"_cancel",(function(t){e.emitEvent("touchcancel",t),e.reset()})),this.canvas=i,this.delegateEvent(n),this.processEvent={}}var e=t.prototype;return e.delegateEvent=function(t){t.addEventListener("click",this._click),t.addEventListener("touchstart",this._start),t.addEventListener("touchmove",this._move),t.addEventListener("touchend",this._end),t.addEventListener("touchcancel",this._cancel)},e.emitEvent=function(t,e){this.canvas.emit(t,e)},e.getEventType=function(t){var e,i=this.eventType,n=this.canvas,r=this.startTime,o=this.startPoints;if(i)return i;var s=n.__events.pan;return e=s&&s.length?Date.now()-r>250&&Wi(o[0],t[0])<10?"press":"pan":"press",this.eventType=e,e},e.enable=function(t){this.processEvent[t]=!0},e.isProcess=function(t){return this.processEvent[t]},e.emitStart=function(t,e){this.isProcess(t)||(this.enable(t),this.emitEvent(t+"start",e))},e.emitEnd=function(t){var e=this,i=this.processEvent;Object.keys(i).forEach((function(n){e.emitEvent(n+"end",t),delete i[n]}))},e.clearPressTimeout=function(){this.pressTimeout&&(clearTimeout(this.pressTimeout),this.pressTimeout=0)},e.reset=function(){this.clearPressTimeout(),this.startTime=0,this.startPoints=null,this.startDistance=0,this.direction=null,this.eventType=null,this.pinch=!1,this.prevMoveTime=0,this.prevMovePoints=null,this.lastMoveTime=0,this.lastMovePoints=null},t}(),Vi=function(t){function e(e){var i;return(i=t.call(this)||this).context=e,i.width=0,i.height=0,i.style={},i.currentStyle={},i.attrs={},i.isCanvasElement=!0,i}Tt(e,t);var i=e.prototype;return i.getContext=function(){return this.context},i.getBoundingClientRect=function(){return{top:0,right:this.width,bottom:this.height,left:0}},i.setAttribute=function(t,e){this.attrs[t]=e},i.addEventListener=function(t,e){this.on(t,e)},i.removeEventListener=function(t,e){this.off(t,e)},i.dispatchEvent=function(t,e){this.emit(t,e)},e}(_t),qi=function(t){return t?function(t){if(!t)return!1;if(1!==t.nodeType||!t.nodeName||"canvas"!==t.nodeName.toLowerCase())return!1;var e=!1;try{t.addEventListener("eventTest",(function(){e=!0})),t.dispatchEvent(new Event("eventTest"))}catch(t){e=!1}return e}(t.canvas)?t.canvas:new Vi(t):null};function Ui(t,e){h(t,(function(t){t=t.split(":"),e.addColorStop(Number(t[0]),t[1])}))}function Ki(t,e,i){if("("===t[1])try{var n=t[0];if("l"===n)return function(t,e,i){var n,r,o=t.split(" "),s=o[0].slice(2,o[0].length-1);n=parseFloat(s)*Math.PI/180,r=2*Math.PI,s=(n%r+r)%r;var a,l,c=o.slice(1),h=e.getBBox(),u=h.minX,f=h.minY,p=h.maxX,d=h.maxY;s>=0&&s<.5*Math.PI?(a={x:u,y:f},l={x:p,y:d}):.5*Math.PI<=s&&s<Math.PI?(a={x:p,y:f},l={x:u,y:d}):Math.PI<=s&&s<1.5*Math.PI?(a={x:p,y:d},l={x:u,y:f}):(a={x:u,y:d},l={x:p,y:f});var g=Math.tan(s),v=g*g,m=(l.x-a.x+g*(l.y-a.y))/(v+1)+a.x,y=g*(l.x-a.x+g*(l.y-a.y))/(v+1)+a.y,x=i.createLinearGradient(a.x,a.y,m,y);return Ui(c,x),x}(t,e,i);if("r"===n)return function(t,e,i){var n=t.split(" "),r=n[0].slice(2,n[0].length-1);r=r.split(",");var o=parseFloat(r[0]),s=parseFloat(r[1]),a=parseFloat(r[2]),l=n.slice(1);if(0===a)return l[l.length-1].split(":")[1];var c=e.getBBox(),h=c.width,u=c.height,f=c.minX,p=c.minY,d=Math.sqrt(h*h+u*u)/2,g=i.createRadialGradient(f+h*o,p+u*s,a*d,f+h/2,p+u/2,d);return Ui(l,g),g}(t,e,i)}catch(t){console.error("error in parsing gradient string, please check if there are any extra whitespaces."),console.error(t)}return t}var Zi={stroke:"strokeStyle",fill:"fillStyle",opacity:"globalAlpha"},Qi=["fillStyle","font","globalAlpha","lineCap","lineWidth","lineJoin","miterLimit","shadowBlur","shadowColor","shadowOffsetX","shadowOffsetY","strokeStyle","textAlign","textBaseline","lineDash","shadow"],Ji=["circle","sector","polygon","rect","polyline"],tn=function(){var t=e.prototype;function e(t){this._initProperties(),O(this._attrs,t);var e=this._attrs.attrs;e&&this.initAttrs(e),this.initTransform()}return t._initProperties=function(){this._attrs={zIndex:0,visible:!0,destroyed:!1}},t.get=function(t){return this._attrs[t]},t.set=function(t,e){this._attrs[t]=e},t.isGroup=function(){return this.get("isGroup")},t.isShape=function(){return this.get("isShape")},t.initAttrs=function(t){this.attr(O(this.getDefaultAttrs(),t))},t.getDefaultAttrs=function(){return{}},t._setAttr=function(t,e){var i=this._attrs.attrs;if("clip"===t)e=this._setAttrClip(e);else{var n=Zi[t];n&&(i[n]=e)}i[t]=e},t._getAttr=function(t){return this._attrs.attrs[t]},t._setAttrClip=function(t){return t&&Ji.indexOf(t._attrs.type)>-1?(null===t.get("canvas")&&(t=Object.assign({},t)),t.set("parent",this.get("parent")),t.set("context",this.get("context")),t):null},t.attr=function(t,e){var i=this;if(i.get("destroyed"))return null;var n=arguments.length;if(0===n)return i._attrs.attrs;if(c(t)){for(var r in this._attrs.bbox=null,t)i._setAttr(r,t[r]);return i._afterAttrsSet&&i._afterAttrsSet(),i}return 2===n?(this._attrs.bbox=null,i._setAttr(t,e),i._afterAttrsSet&&i._afterAttrsSet(),i):i._getAttr(t)},t.getParent=function(){return this.get("parent")},t.draw=function(t){this.get("destroyed")||this.get("visible")&&(this.setContext(t),this.drawInner(t),this.restoreContext(t))},t.setContext=function(t){var e=this._attrs.attrs.clip;t.save(),e&&(e.resetTransform(t),e.createPath(t),t.clip()),this.resetContext(t),this.resetTransform(t)},t.restoreContext=function(t){t.restore()},t.resetContext=function(t){var e=this._attrs.attrs;for(var i in e)if(Qi.indexOf(i)>-1){var n=e[i];"fillStyle"!==i&&"strokeStyle"!==i||!n||(n=Ki(n,this,t)),"lineDash"===i&&t.setLineDash&&l(n)?t.setLineDash(n):t[i]=n}},t.hasFill=function(){return this.get("canFill")&&this._attrs.attrs.fillStyle},t.hasStroke=function(){return this.get("canStroke")&&this._attrs.attrs.strokeStyle},t.drawInner=function(){},t.show=function(){return this.set("visible",!0),this},t.hide=function(){return this.set("visible",!1),this},t.isVisible=function(){return this.get("visible")},t.getAriaLabel=function(){var t=this._attrs,e=t.destroyed,i=t.visible,n=t.isShape,r=t.aria;if(!e&&i&&(!n||r))return this._getAriaLabel()},t._getAriaLabel=function(){return this._attrs.ariaLabel},t._removeFromParent=function(){var t=this.get("parent");return t&&q(t.get("children"),this),this},t.remove=function(t){t?this.destroy():this._removeFromParent()},t.destroy=function(){if(this.get("destroyed"))return null;this._removeFromParent(),this._attrs={},this.set("destroyed",!0)},t.getBBox=function(){return{minX:0,maxX:0,minY:0,maxY:0,width:0,height:0}},t.initTransform=function(){var t=this._attrs.attrs||{};t.matrix||(t.matrix=[1,0,0,1,0,0]),this._attrs.attrs=t},t.getMatrix=function(){return this._attrs.attrs.matrix},t.setMatrix=function(t){this._attrs.attrs.matrix=[t[0],t[1],t[2],t[3],t[4],t[5]]},t.transform=function(t){var e=this._attrs.attrs.matrix;return this._attrs.attrs.matrix=Ot.transform(e,t),this},t.setTransform=function(t){return this._attrs.attrs.matrix=[1,0,0,1,0,0],this.transform(t)},t.translate=function(t,e){var i=this._attrs.attrs.matrix;Ot.translate(i,i,[t,e])},t.rotate=function(t){var e=this._attrs.attrs.matrix;Ot.rotate(e,e,t)},t.scale=function(t,e){var i=this._attrs.attrs.matrix;Ot.scale(i,i,[t,e])},t.moveTo=function(t,e){var i=this._attrs.x||0,n=this._attrs.y||0;this.translate(t-i,e-n),this.set("x",t),this.set("y",e)},t.apply=function(t){var e=this._attrs.attrs.matrix;return Et.transformMat2d(t,t,e),this},t.resetTransform=function(t){var e=this._attrs.attrs.matrix;Ot.isChanged(e)&&t.transform(e[0],e[1],e[2],e[3],e[4],e[5])},t.isDestroyed=function(){return this.get("destroyed")},e}(),en=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initProperties=function(){this._attrs={zIndex:0,visible:!0,destroyed:!1,isShape:!0,attrs:{}}},i.getType=function(){return this._attrs.type},i.drawInner=function(t){var e=this.get("attrs");this.createPath(t);var i=t.globalAlpha;if(this.hasFill()){var n=e.fillOpacity;a(n)||1===n?t.fill():(t.globalAlpha=n,t.fill(),t.globalAlpha=i)}if(this.hasStroke()&&e.lineWidth>0){var r=e.strokeOpacity;a(r)||1===r||(t.globalAlpha=r),t.stroke()}},i.getBBox=function(){var t=this._attrs.bbox;return t||((t=this.calculateBox())&&(t.x=t.minX,t.y=t.minY,t.width=t.maxX-t.minX,t.height=t.maxY-t.minY),this._attrs.bbox=t),t},i.calculateBox=function(){return null},i.createPath=function(){},e}(tn),nn=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initProperties=function(){t.prototype._initProperties.call(this),this._attrs.canFill=!0,this._attrs.canStroke=!0,this._attrs.type="rect"},i.getDefaultAttrs=function(){return{x:0,y:0,width:0,height:0,radius:0,lineWidth:0}},i.createRadiusPath=function(t,e,i,n,r,o){o=function(t,e,i){if(!((t=gt(t))[0]||t[1]||t[2]||t[3]))return t;var n=Math.max(t[0]+t[1],t[2]+t[3]),r=Math.max(t[0]+t[3],t[1]+t[2]),o=Math.min(e/n,i/r);return o<1?t.map((function(t){return t*o})):t}(o,n,r),t.moveTo(e+o[0],i),t.lineTo(e+n-o[1],i),t.arc(e+n-o[1],i+o[1],o[1],-Math.PI/2,0,!1),t.lineTo(e+n,i+r-o[2]),t.arc(e+n-o[2],i+r-o[2],o[2],0,Math.PI/2,!1),t.lineTo(e+o[3],i+r),t.arc(e+o[3],i+r-o[3],o[3],Math.PI/2,Math.PI,!1),t.lineTo(e,i+o[0]),t.arc(e+o[0],i+o[0],o[0],Math.PI,3*Math.PI/2,!1),t.closePath()},i.createPath=function(t){var e=this.get("attrs"),i=e.x,n=e.y,r=e.width,o=e.height,s=e.radius;t.beginPath(),s&&r*o?this.createRadiusPath(t,i,n,r,o,s):t.rect(i,n,r,o)},i.calculateBox=function(){var t=this.get("attrs"),e=t.x,i=t.y;return{minX:e,minY:i,maxX:e+t.width,maxY:i+t.height}},e}(en),rn={},on=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initProperties=function(){t.prototype._initProperties.call(this),this._attrs.canFill=!1,this._attrs.canStroke=!1,this._attrs.loading=!1,this._attrs.image=null,this._attrs.type="image"},i.draw=function(e){var i=this;if(!this.get("loading"))if(this.get("image"))t.prototype.draw.call(this,e);else{var n=this.get("attrs").src;if(n&&window.Image){var r=this.get("cacheImage");if(r&&rn[n])return this.set("image",rn[n]),void this.draw(e);this.set("loading",!0);var o=new Image;o.crossOrigin="",o.onload=function(){i.set("loading",!1),i.set("image",o),i.draw(e)},o.src=n,r&&(rn[n]=o)}}},i.createPath=function(t){var e=this.get("image");this.drawImage(t,e)},i.drawImage=function(t,e){var i=this._attrs,n=i.attrs;if(!i.destroyed){var r=n.x,o=n.y,s=n.width,l=n.height,c=n.sx,h=n.sy,u=n.swidth,f=n.sheight,p=n.radius,d=n.fillOpacity;p&&(t.save(),this.createRadiusPath(t,r,o,s,l,p),t.clip());var g=t.globalAlpha;a(d)||(t.globalAlpha=d),a(c)||a(h)||a(u)||a(f)?t.drawImage(e,r,o,s,l):t.drawImage(e,c,h,u,f,r,o,s,l),t.globalAlpha=g,p&&t.restore()}},e}(nn),sn=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initProperties=function(){t.prototype._initProperties.call(this),this._attrs.canFill=!0,this._attrs.canStroke=!0,this._attrs.type="circle"},i.getDefaultAttrs=function(){return{x:0,y:0,r:0,lineWidth:0}},i.createPath=function(t){var e=this.get("attrs"),i=e.x,n=e.y,r=e.r;t.beginPath(),t.arc(i,n,r,0,2*Math.PI,!1),t.closePath()},i.calculateBox=function(){var t=this.get("attrs"),e=t.x,i=t.y,n=t.r;return{minX:e-n,maxX:e+n,minY:i-n,maxY:i+n}},e}(en),an=Et.create(),ln=Et.create(),cn=Et.create();function hn(t,e,i,n,r){var o=t*t;return e+(3*-e+t*(3*e-e*t))*t+(3*i+t*(-6*i+3*i*t))*t+(3*n-3*n*t)*o+r*(o*t)}function un(t){for(var e,i,n,r,o,s=1/0,a=-1/0,l=1/0,c=-1/0,h={x:t[0],y:t[1]},u={x:t[2],y:t[3]},f={x:t[4],y:t[5]},p={x:t[6],y:t[7]},d=0;d<100;d++){var g={x:hn(o=d/100,(e=h).x,(i=u).x,(n=f).x,(r=p).x),y:hn(o,e.y,i.y,n.y,r.y)};g.x<s&&(s=g.x),g.x>a&&(a=g.x),g.y<l&&(l=g.y),g.y>c&&(c=g.y)}return{minX:s,minY:l,maxX:a,maxY:c}}function fn(t,e){if(0!==t.length){for(var i=t[0],n=i.x,r=i.x,o=i.y,s=i.y,a=t.length,l=1;l<a;l++)i=t[l],n=Math.min(n,i.x),r=Math.max(r,i.x),o=Math.min(o,i.y),s=Math.max(s,i.y);return{minX:n-(e=e/2||0),minY:o-e,maxX:r+e,maxY:s+e}}}function pn(t,e,i,n,r,o){var s=Math.abs(n-r);if(s%(2*Math.PI)<1e-4&&s>1e-4)return{minX:t-i,minY:e-i,maxX:t+i,maxY:e+i};an[0]=Math.cos(n)*i+t,an[1]=Math.sin(n)*i+e,ln[0]=Math.cos(r)*i+t,ln[1]=Math.sin(r)*i+e;var a=[0,0],l=[0,0];if(Et.min(a,an,ln),Et.max(l,an,ln),(n%=2*Math.PI)<0&&(n+=2*Math.PI),(r%=2*Math.PI)<0&&(r+=2*Math.PI),n>r&&!o?r+=2*Math.PI:n<r&&o&&(n+=2*Math.PI),o){var c=r;r=n,n=c}for(var h=0;h<r;h+=Math.PI/2)h>n&&(cn[0]=Math.cos(h)*i+t,cn[1]=Math.sin(h)*i+e,Et.min(a,cn,a),Et.max(l,cn,l));return{minX:a[0],minY:a[1],maxX:l[0],maxY:l[1]}}var dn=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initProperties=function(){t.prototype._initProperties.call(this),this._attrs.canStroke=!0,this._attrs.type="line"},i.getDefaultAttrs=function(){return{x1:0,y1:0,x2:0,y2:0,lineWidth:1}},i.createPath=function(t){var e=this.get("attrs"),i=e.x1,n=e.y1,r=e.x2,o=e.y2;t.beginPath(),t.moveTo(i,n),t.lineTo(r,o)},i.calculateBox=function(){var t=this.get("attrs");return function(t,e,i,n,r){return r=r/2||0,{minX:Math.min(t,i)-r,minY:Math.min(e,n)-r,maxX:Math.max(t,i)+r,maxY:Math.max(e,n)+r}}(t.x1,t.y1,t.x2,t.y2,t.lineWidth)},e}(en),gn=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initProperties=function(){t.prototype._initProperties.call(this),this._attrs.canFill=!0,this._attrs.canStroke=!0,this._attrs.type="polygon"},i.getDefaultAttrs=function(){return{points:null,lineWidth:0}},i.createPath=function(t){var e=this.get("attrs").points;t.beginPath();for(var i=0,n=e.length;i<n;i++){var r=e[i];0===i?t.moveTo(r.x,r.y):t.lineTo(r.x,r.y)}t.closePath()},i.calculateBox=function(){return fn(this.get("attrs").points)},e}(en);function vn(t){return[t.x,t.y]}function mn(t,e,i){for(var n,r,o,s=!!e,a=function(t,e,i,n){var r,o,s,a,l,c,h,u,f=[],p=!!n;if(p){for(s=[1/0,1/0],a=[-1/0,-1/0],u=0,h=t.length;u<h;u++)l=vn(t[u]),Et.min(s,s,l),Et.max(a,a,l);Et.min(s,s,n[0]),Et.max(a,a,n[1])}for(u=0,c=t.length;u<c;u++){if(l=vn(t[u]),i)r=vn(t[u?u-1:c-1]),o=vn(t[(u+1)%c]);else{if(0===u||u===c-1){f.push([l[0],l[1]]);continue}r=vn(t[u-1]),o=vn(t[u+1])}var d=Et.sub([],o,r);Et.scale(d,d,e);var g=Et.distance(l,r),v=Et.distance(l,o),m=g+v;0!==m&&(g/=m,v/=m);var y=Et.scale([],d,-g),x=Et.scale([],d,v),b=Et.add([],l,y),S=Et.add([],l,x);p&&(Et.max(b,b,s),Et.min(b,b,a),Et.max(S,S,s),Et.min(S,S,a)),f.push([b[0],b[1]]),f.push([S[0],S[1]])}return i&&f.push(f.shift()),f}(t,.4,s,i),l=t.length,c=[],h=0;h<l-1;h++)n=a[2*h],r=a[2*h+1],o=t[h+1],c.push(["C",n[0],n[1],r[0],r[1],o.x,o.y]);return s&&(n=a[l],r=a[l+1],o=t[0],c.push(["C",n[0],n[1],r[0],r[1],o.x,o.y])),c}function yn(t){for(var e=[],i=0,n=t.length;i<n;i++){var r=t[i];isNaN(r.x)||isNaN(r.y)||e.push(r)}return e}var xn=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initProperties=function(){t.prototype._initProperties.call(this),this._attrs.canFill=!0,this._attrs.canStroke=!0,this._attrs.type="polyline"},i.getDefaultAttrs=function(){return{points:null,lineWidth:1,smooth:!1}},i.createPath=function(t){var e=this.get("attrs"),i=e.points,n=e.smooth,r=yn(i);if(t.beginPath(),r.length)if(t.moveTo(r[0].x,r[0].y),n)for(var o=mn(r,!1,[[0,0],[1,1]]),s=0,a=o.length;s<a;s++){var l=o[s];t.bezierCurveTo(l[1],l[2],l[3],l[4],l[5],l[6])}else{var c,h;for(c=1,h=r.length-1;c<h;c++)t.lineTo(r[c].x,r[c].y);t.lineTo(r[h].x,r[h].y)}},i.calculateBox=function(){var t=this.get("attrs"),e=t.points,i=t.smooth,n=t.lineWidth,r=yn(e);if(i){for(var o=[],s=mn(r,!1,[[0,0],[1,1]]),a=0,l=s.length;a<l;a++){var c=s[a];if(0===a)o.push([r[0].x,r[0].y,c[1],c[2],c[3],c[4],c[5],c[6]]);else{var h=s[a-1];o.push([h[5],h[6],c[1],c[2],c[3],c[4],c[5],c[6]])}}return function(t,e){for(var i=1/0,n=-1/0,r=1/0,o=-1/0,s=0,a=t.length;s<a;s++){var l=un(t[s]);l.minX<i&&(i=l.minX),l.maxX>n&&(n=l.maxX),l.minY<r&&(r=l.minY),l.maxY>o&&(o=l.maxY)}return{minX:i-(e=e/2||0),minY:r-e,maxX:n+e,maxY:o+e}}(o,n)}return fn(r,n)},e}(en),bn=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initProperties=function(){t.prototype._initProperties.call(this),this._attrs.canStroke=!0,this._attrs.canFill=!0,this._attrs.type="arc"},i.getDefaultAttrs=function(){return{x:0,y:0,r:0,startAngle:0,endAngle:2*Math.PI,anticlockwise:!1,lineWidth:1}},i.createPath=function(t){var e=this.get("attrs"),i=e.x,n=e.y,r=e.r,o=e.startAngle,s=e.endAngle,a=e.anticlockwise;t.beginPath(),o!==s&&t.arc(i,n,r,o,s,a)},i.calculateBox=function(){var t=this.get("attrs");return pn(t.x,t.y,t.r,t.startAngle,t.endAngle,t.anticlockwise)},e}(en),Sn=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initProperties=function(){t.prototype._initProperties.call(this),this._attrs.canFill=!0,this._attrs.canStroke=!0,this._attrs.type="sector"},i.getDefaultAttrs=function(){return{x:0,y:0,lineWidth:0,r:0,r0:0,startAngle:0,endAngle:2*Math.PI,anticlockwise:!1}},i.createPath=function(t){var e=this.get("attrs"),i=e.x,n=e.y,r=e.startAngle,o=e.endAngle,s=e.r,a=e.r0,l=e.anticlockwise;t.beginPath();var c=Math.cos(r),h=Math.sin(r);t.moveTo(c*a+i,h*a+n),t.lineTo(c*s+i,h*s+n),(Math.abs(o-r)>1e-4||0===r&&o<0)&&(t.arc(i,n,s,r,o,l),t.lineTo(Math.cos(o)*a+i,Math.sin(o)*a+n),0!==a&&t.arc(i,n,a,o,r,!l)),t.closePath()},i.calculateBox=function(){var t=this.get("attrs"),e=t.x,i=t.y,n=t.r,r=t.r0,o=t.startAngle,s=t.endAngle,a=t.anticlockwise,l=pn(e,i,n,o,s,a),c=pn(e,i,r,o,s,a);return{minX:Math.min(l.minX,c.minX),minY:Math.min(l.minY,c.minY),maxX:Math.max(l.maxX,c.maxX),maxY:Math.max(l.maxY,c.maxY)}},e}(en),wn=function(t){var e=t.width,i=t.height,n=t.rotate,r=Math.abs(n);return{width:Math.abs(e*Math.cos(r)+i*Math.sin(r)),height:Math.abs(i*Math.cos(r)+e*Math.sin(r))}},kn=0,Cn={},Tn=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initProperties=function(){t.prototype._initProperties.call(this),this._attrs.canFill=!0,this._attrs.canStroke=!0,this._attrs.type="text"},i.getDefaultAttrs=function(){return{lineWidth:0,lineCount:1,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom",lineHeight:null,textArr:null}},i._getFontStyle=function(){var t=this._attrs.attrs,e=t.fontSize,i=t.fontFamily,n=t.fontWeight;return t.fontStyle+" "+t.fontVariant+" "+n+" "+e+"px "+i},i._afterAttrsSet=function(){var t=this._attrs.attrs;if(t.font=this._getFontStyle(),t.text){var e=t.text,i=null,n=1;g(e)&&-1!==e.indexOf("\n")&&(n=(i=e.split("\n")).length),t.lineCount=n,t.textArr=i}this.set("attrs",t)},i._getTextHeight=function(){var t=this._attrs.attrs;if(t.height)return t.height;var e=t.lineCount,i=1*t.fontSize;return e>1?i*e+this._getSpaceingY()*(e-1):i},i._getSpaceingY=function(){var t=this._attrs.attrs,e=t.lineHeight,i=1*t.fontSize;return e?e-i:.14*i},i.drawInner=function(t){var e=this._attrs.attrs,i=e.text,n=e.x,r=e.y;if(!(a(i)||isNaN(n)||isNaN(r))){var o=e.textArr,s=1*e.fontSize,l=this._getSpaceingY();e.rotate&&(t.translate(n,r),t.rotate(e.rotate),n=0,r=0);var c,h,u=e.textBaseline;if(o&&(c=this._getTextHeight()),this.hasFill()){var f=e.fillOpacity;if(a(f)||1===f||(t.globalAlpha=f),o)for(var p=0,d=o.length;p<d;p++){var g=o[p];h=r+p*(l+s)-c+s,"middle"===u&&(h+=c-s-(c-s)/2),"top"===u&&(h+=c-s),t.fillText(g,n,h)}else t.fillText(i,n,r)}if(this.hasStroke())if(o)for(var v=0,m=o.length;v<m;v++){var y=o[v];h=r+v*(l+s)-c+s,"middle"===u&&(h+=c-s-(c-s)/2),"top"===u&&(h+=c-s),t.strokeText(y,n,h)}else t.strokeText(i,n,r)}},i._getAriaLabel=function(){return this._attrs.attrs.text},i.calculateBox=function(){var t=this._attrs.attrs,e=t.x,i=t.y,n=t.textAlign,r=t.textBaseline,o=this._getTextWidth();if(!o)return{minX:e,minY:i,maxX:e,maxY:i};var s=this._getTextHeight();if(t.rotate){var a=wn({width:o,height:s,rotate:t.rotate});o=a.width,s=a.height}var l={x:e,y:i-s};return n&&("end"===n||"right"===n?l.x-=o:"center"===n&&(l.x-=o/2)),r&&("top"===r?l.y+=s:"middle"===r&&(l.y+=s/2)),{minX:l.x,minY:l.y,maxX:l.x+o,maxY:l.y+s}},i._getTextWidth=function(){var t=this._attrs.attrs;if(t.width)return t.width;var e=t.text,i=this.get("context");if(!a(e)){var n=t.font,r=t.textArr,o=e+""+n;if(Cn[o])return Cn[o];var s=0;if(r)for(var l=0,c=r.length;l<c;l++){var h=r[l];s=Math.max(s,dt(h,n,i).width)}else s=dt(e,n,i).width;return kn>5e3&&(kn=0,Cn={}),kn++,Cn[o]=s,s}},e}(en),Pn=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initProperties=function(){t.prototype._initProperties.call(this),this._attrs.canFill=!0,this._attrs.canStroke=!0,this._attrs.createPath=null,this._attrs.type="custom"},i.createPath=function(t){var e=this.get("createPath");e&&e.call(this,t)},i.calculateBox=function(){var t=this.get("calculateBox");return t&&t.call(this)},e}(en),Mn={circle:function(t,e,i,n){n.arc(t,e,i,0,2*Math.PI,!1)},square:function(t,e,i,n){n.moveTo(t-i,e-i),n.lineTo(t+i,e-i),n.lineTo(t+i,e+i),n.lineTo(t-i,e+i),n.closePath()}},_n=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initProperties=function(){t.prototype._initProperties.call(this),this._attrs.canFill=!0,this._attrs.canStroke=!0,this._attrs.type="marker"},i.getDefaultAttrs=function(){return{x:0,y:0,lineWidth:0}},i.createPath=function(t){var e,i=this.get("attrs"),n=i.x,r=i.y,o=i.radius,a=i.symbol||"circle";e=s(a)?a:Mn[a],t.beginPath(),e(n,r,o,t,this)},i.calculateBox=function(){var t=this.get("attrs"),e=t.x,i=t.y,n=t.radius;return{minX:e-n,minY:i-n,maxX:e+n,maxY:i+n}},e}(en);en.Rect=nn,en.Image=on,en.Circle=sn,en.Line=dn,en.Polygon=gn,en.Polyline=xn,en.Arc=bn,en.Sector=Sn,en.Text=Tn,en.Custom=Pn,en.Marker=_n;var In={},Dn={getGroupClass:function(){},getChildren:function(){return this.get("children")},addShape:function(t,e){void 0===e&&(e={});var i=In[t];i||(i=T(t),In[t]=i);var n=new en[i](e);return this.add(n),n},addGroup:function(t){var e=new(this.getGroupClass())(t);return this.add(e),e},contain:function(t){return this.get("children").indexOf(t)>-1},sort:function(){for(var t=this.get("children"),e=0,i=t.length;e<i;e++)t[e]._INDEX=e;return t.sort(function(t){return function(e,i){var n=t(e,i);return 0===n?e._INDEX-i._INDEX:n}}((function(t,e){return t.get("zIndex")-e.get("zIndex")}))),this},drawChildren:function(t){for(var e=this.get("children"),i=0,n=e.length;i<n;i++)e[i].draw(t);return this},clear:function(){for(var t=this.get("children");0!==t.length;)t[t.length-1].remove(!0);return this},add:function(t){var e=this.get("children");l(t)||(t=[t]);for(var i=0,n=t.length;i<n;i++){var r=t[i],o=r.get("parent");o&&q(o.get("children"),r),this._setEvn(r),e.push(r)}return this},_setEvn:function(t){var e=this._attrs,i=e.context,n=e.canvas,r=e.aria,o=t._attrs,s=o.isGroup,a=o.type;t._attrs.parent=this,t._attrs.context=i,t._attrs.canvas=n,r&&!1!==t._attrs.aria&&(t._attrs.aria=r),"text"===a&&n&&n.get("fontFamily")&&(t._attrs.attrs.fontFamily=t._attrs.attrs.fontFamily||n.get("fontFamily"));var l=t._attrs.attrs.clip;if(l&&(l._attrs.parent=this,l._attrs.context=i,l._attrs.canvas=n),s)for(var c=t._attrs.children,h=0,u=c.length;h<u;h++)t._setEvn(c[h])},_getAriaLabel:function(){var t=this._attrs,e=t.aria,i=t.ariaLabel,n=t.children;if(e){var r=[];if(n&&n.length)for(var o=0,s=n.length;o<s;o++){var a=n[o].getAriaLabel();a&&r.push(a)}var l=r.join(" ");return i&&l?i+" "+l+" ":i||l}}},On=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initProperties=function(){this._attrs={type:"group",zIndex:0,visible:!0,destroyed:!1,isGroup:!0,canFill:!0,canStroke:!0,attrs:{},children:[]}},i.getBBox=function(){for(var t=1/0,e=-1/0,i=1/0,n=-1/0,r=this.get("children"),o=0,s=r.length;o<s;o++){var a=r[o];if(a.get("visible")){var l=a.getBBox();if(!l)continue;var c=[l.minX,l.minY],h=[l.minX,l.maxY],u=[l.maxX,l.minY],f=[l.maxX,l.maxY],p=a.attr("matrix");Et.transformMat2d(c,c,p),Et.transformMat2d(h,h,p),Et.transformMat2d(u,u,p),Et.transformMat2d(f,f,p),t=Math.min(c[0],h[0],u[0],f[0],t),e=Math.max(c[0],h[0],u[0],f[0],e),i=Math.min(c[1],h[1],u[1],f[1],i),n=Math.max(c[1],h[1],u[1],f[1],n)}}return{minX:t,minY:i,maxX:e,maxY:n,x:t,y:i,width:e-t,height:n-i}},i.createPath=function(e){var i=this.get("attrs");(i.fillStyle||i.strokeStyle)&&t.prototype.createPath.call(this,e)},i.drawInner=function(e){t.prototype.drawInner.call(this,e),this.drawChildren(e)},i.destroy=function(){this.get("destroyed")||(this.clear(),t.prototype.destroy.call(this))},e}(nn);O(On.prototype,Dn,{getGroupClass:function(){return On}});var En="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:function(t){return setTimeout(t,16)},An=function(t){Tt(i,t);var e=i.prototype;function i(e){var i;i=t.call(this)||this;var n=e.title,r=n?C(St.general.withTitle,{title:n}):St.general.title;return i._attrs=O({type:"canvas",children:[],ariaLabel:r},e),i._initPixelRatio(),i._initCanvas(),i}return e.get=function(t){return this._attrs[t]},e.set=function(t,e){this._attrs[t]=e},e._initPixelRatio=function(){this.get("pixelRatio")||this.set("pixelRatio",nt())},e.beforeDraw=function(){var t=this._attrs.context,e=this._attrs.el;t&&t.clearRect&&t.clearRect(0,0,e.width,e.height)},e._initCanvas=function(){var t,e=this.get("el"),i=this.get("context");if(!e&&!i)throw new Error("Please specify the id, el or context of the chart!");t=e?g(e)?at(e):e:qi(i),i&&t&&!t.getContext&&(t.getContext=function(){return i});var n=this.get("width");n||(n=ot(t));var r=this.get("height");r||(r=st(t)),this.set("canvas",this),this.set("el",t),this.set("context",i||t.getContext("2d")),this.changeSize(n,r);var o=new Gi({canvas:this,el:t});this.set("eventController",o)},e.changeSize=function(t,e){var i=this.get("pixelRatio"),n=this.get("el");n.style&&(n.style.width=t+"px",n.style.height=e+"px"),it(n)&&(n.width=t*i,n.height=e*i,1!==i&&this.get("context").scale(i,i)),this.set("width",t),this.set("height",e)},e.getWidth=function(){var t=this.get("pixelRatio");return this.get("width")*t},e.getHeight=function(){var t=this.get("pixelRatio");return this.get("height")*t},e.getPointByClient=function(t,e){var i=this.get("el"),n=i.getBoundingClientRect(),r=n.right-n.left,o=n.bottom-n.top;return{x:(t-n.left)*(i.width/r),y:(e-n.top)*(i.height/o)}},e._beginDraw=function(){this._attrs.toDraw=!0},e._endDraw=function(){this._attrs.toDraw=!1},e.draw=function(){var t=this;t.get("destroyed")||(t.get("animateHandler")?this._beginDraw():function e(){t.set("animateHandler",En((function(){t.set("animateHandler",void 0),t.get("toDraw")&&e()}))),t.beforeDraw();try{var i=t._attrs.context;t.drawChildren(i),i.draw&&i.draw(),t.setAriaLabel()}catch(e){console.warn("error in draw canvas, detail as:"),console.warn(e),t._endDraw()}t._endDraw()}())},e.setAriaLabel=function(){var t=this._attrs.el,e=this._getAriaLabel();e&&t.setAttribute&&t.setAttribute("aria-label",e)},e.destroy=function(){if(!this.get("destroyed")){var t=this.get("el");t.width=0,t.height=0,this.clear(),this._attrs={},this.set("destroyed",!0)}},e.isDestroyed=function(){return this.get("destroyed")},i}(_t);O(An.prototype,Dn,{getGroupClass:function(){return On}});var Bn={};function Yn(t){var e=Bn[t];return e||{Canvas:An,Group:On,Shape:en}}function zn(t){return new(Yn(t.renderer).Canvas)(t)}var Nn=Object.freeze({__proto__:null,registerEngine:function(t,e){Bn[t]=e},getEngine:Yn,createCanvas:zn,Canvas:An,Group:On,Shape:en,Matrix:Ot,Vector2:Et});function Hn(t){var e,i=t.start,n=t.end,r=n.x-i.x,o=Math.abs(n.y-i.y);if(t.isPolar){var s=t.circleRadius,a=t.center,l=t.startAngle,c=t.endAngle;e=new en.Sector({attrs:{x:a.x,y:a.y,r:s,r0:0,startAngle:l,endAngle:c}})}else e=new en.Rect({attrs:{x:i.x,y:n.y-10,width:r,height:o+20}});return e.isClip=!0,e}function Ln(t,e){var i=t.x,n=t.y,r=e.tl,o=e.tr,s=e.br;return i>=r.x&&i<=o.x&&n>=r.y&&n<=s.y}var Xn=Object.freeze({__proto__:null,getClip:Hn,isPointInPlot:Ln});function Fn(t,e){return t-e}var jn=function(t){Tt(i,t),i.initPlugins=function(){return{_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach((function(t){var i=e.indexOf(t);-1!==i&&e.splice(i,1)})),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,i){var n,r,o,s,a=this.descriptors(t),l=a.length;for(n=0;n<l;++n)if("function"==typeof(s=(r=a[n].plugin)[e])&&(o=[t].concat(i||[]),!1===s.apply(r,o)))return!1;return!0},descriptors:function(t){var e=t._plugins||(t._plugins={});if(e.id===this._cacheId)return e.descriptors;var i=[],n=[];return this._plugins.concat(t&&t.get("plugins")||[]).forEach((function(t){-1===i.indexOf(t)&&(i.push(t),n.push({plugin:t}))})),e.descriptors=n,e.id=this._cacheId,n}}};var e=i.prototype;function i(e){var i,n=Mt(i=t.call(this,e)||this);return h(ne,(function(t,e){var i=k(e);n[i]=function(e){var i=new t(e);return n.addGeom(i),i}})),n._init(),i}return e.getDefaultCfg=function(){return{id:null,renderer:"canvas",rendered:!1,padding:wt.padding,data:null,scales:{},geoms:[],colDefs:null,pixelRatio:wt.pixelRatio,filters:null,appendPadding:wt.appendPadding}},e._syncYScales=function(){if(this.get("syncY")){var t=this.get("geoms"),e=[],i=[],n=[];h(t,(function(t){var r=t.getYScale();r.isLinear&&(e.push(r),i.push(r.min),n.push(r.max))})),i=Math.min.apply(null,i),n=Math.max.apply(null,n),h(e,(function(t){t.change({min:i}),t.change({max:n})}))}},e._getFieldsForLegend=function(){var t=[];return h(this.get("geoms"),(function(e){var i=e.get("attrOptions").color;i&&i.field&&g(i.field)&&h(i.field.split("*"),(function(e){-1===t.indexOf(e)&&t.push(e)}))})),t},e._getScaleData=function(t){var e=this.get("data"),i=this.get("filteredData");return i.length&&-1===this._getFieldsForLegend().indexOf(t)&&(e=i),e},e._adjustScale=function(){for(var t=this.get("scaleController"),e=this.get("geoms"),i=0;i<e.length;i++){var n=e[i];if("interval"===n.get("type")){var r=n.getYScale();t.adjustStartZero(r)}}},e._removeGeoms=function(){for(var t=this.get("geoms");t.length>0;)t.shift().destroy()},e._clearGeoms=function(){for(var t=this.get("geoms"),e=0,i=t.length;e<i;e++)t[e].clear()},e._clearInner=function(){this._clearGeoms(),i.plugins.notify(this,"clearInner"),this.emit("clearinner"),this.get("axisController")&&this.get("axisController").clear()},e._initFilteredData=function(){var t=this.get("filters"),e=this.get("data")||[];t&&(e=e.filter((function(e){var i=!0;return h(t,(function(t,n){if(t&&!(i=t(e[n],e)))return!1})),i}))),this.set("filteredData",e)},e._changeGeomsData=function(){for(var t=this.get("geoms"),e=this.get("filteredData"),i=0,n=t.length;i<n;i++)t[i].changeData(e)},e._initGeom=function(t){if(!t.get("isInit")){var e=this.get("coord"),i=this.get("filteredData"),n=this.get("colDefs"),r=this.get("middlePlot");t.set("chart",this),t.set("container",r.addGroup()),t.set("data",i),t.set("coord",e),t.set("colDefs",n),t.init(),this.emit("_aftergeominit",t)}},e._initGeoms=function(){for(var t=this.get("geoms"),e=0,i=t.length;e<i;e++)this._initGeom(t[e])},e._initCoord=function(){var t=this.get("plotRange"),e=O({type:"cartesian"},this.get("coordCfg"),{plot:t}),i=e.type,n=new(0,Bt[T(i)])(e);this.set("coord",n)},e._initLayout=function(){var t=this.get("_padding");t||(t=gt(t=this.get("margin")||this.get("padding")));var e="auto"===t[0]?0:t[0],i="auto"===t[1]?0:t[1],n="auto"===t[2]?0:t[2],r={x:"auto"===t[3]?0:t[3],y:e},o={x:this.get("width")-i,y:this.get("height")-n},s=this.get("plot");if(s)s.reset(r,o);else{var a=new Dt({start:r,end:o});this.set("plotRange",a),this.set("plot",a)}},e._initCanvas=function(){try{var t=zn({renderer:this.get("renderer"),el:this.get("el")||this.get("id"),context:this.get("context"),pixelRatio:this.get("pixelRatio"),width:this.get("width"),height:this.get("height"),fontFamily:wt.fontFamily,aria:this.get("aria"),title:this.get("title"),landscape:this.get("landscape")});this.set("canvas",t),this.set("el",t.get("el")),this.set("width",t.get("width")),this.set("height",t.get("height"))}catch(t){throw t}i.plugins.notify(this,"afterCanvasInit")},e._initLayers=function(){var t=this.get("canvas");this.set("backPlot",t.addGroup()),this.set("middlePlot",t.addGroup({zIndex:10})),this.set("frontPlot",t.addGroup({zIndex:20}))},e._initEvents=function(){var t=this;this.on("afterdatachange",(function(){t._initFilteredData(),t._changeGeomsData()})),this.on("_aftersizechange",(function(){t._initLayout();var e=t.get("coord");e&&e.reset(t.get("plot"))}))},e._initScaleController=function(){var t=new Xi({chart:this});this.set("colDefs",t.defs),this.set("scales",t.scales),this.set("scaleController",t)},e._clearScaleController=function(){this.get("scaleController").clear()},e._init=function(){this._initCanvas(),this._initLayout(),this._initLayers(),this._initEvents(),this._initScaleController(),this.set("axisController",new Ri({frontPlot:this.get("frontPlot").addGroup({className:"axisContainer"}),backPlot:this.get("backPlot").addGroup({className:"axisContainer"}),chart:this})),i.plugins.notify(this,"init")},e.init=function(){this._initFilteredData(),this._initCoord(),i.plugins.notify(this,"beforeGeomInit"),this._initGeoms(),this._syncYScales(),this._adjustScale(),this.emit("afterinit")},e.source=function(t,e){return this.set("data",t),e&&this.scale(e),this},e.scale=function(t,e){return this.get("scaleController").setFieldDef(t,e),this},e.axis=function(t,e){var i=this.get("axisController");return t?(i.axisCfg=i.axisCfg||{},i.axisCfg[t]=e):i.axisCfg=null,this},e.coord=function(t,e){var i;return c(t)?i=t:(i=e||{}).type=t||"cartesian",this.set("coordCfg",i),this},e.filter=function(t,e){var i=this.get("filters")||{};i[t]=e,this.set("filters",i),this.get("rendered")&&this.emit("afterdatachange",this.get("data"))},e.render=function(){var t=this.get("rendered"),e=this.get("canvas"),n=this.get("geoms");t?(this._initGeoms(),this._adjustScale()):(this.init(),this.set("rendered",!0)),this.emit("beforerender"),i.plugins.notify(this,"beforeGeomDraw"),this._renderAxis();var r=this.get("middlePlot");if(this.get("limitInPlot")&&!r.attr("clip")){var o=Hn(this.get("coord"));o.set("canvas",r.get("canvas")),r.attr("clip",o)}this.emit("beforegeomdraw");for(var s=0,a=n.length;s<a;s++)n[s].paint();return this.emit("aftergeomdraw"),i.plugins.notify(this,"afterGeomDraw"),e.sort(),this.get("frontPlot").sort(),i.plugins.notify(this,"beforeCanvasDraw"),e.draw(),this.emit("afterrender"),this},e.clear=function(){return i.plugins.notify(this,"clear"),this.emit("clear"),this._clearInner(),this._removeGeoms(),this._clearScaleController(),this.set("legendItems",null),this.set("filters",null),this.set("isUpdate",!1),this.set("_padding",null),this.set("rendered",!1),this.get("canvas").draw(),this},e.repaint=function(){this.get("rendered")&&(this.set("isUpdate",!0),this.set("legendItems",null),i.plugins.notify(this,"repaint"),this._clearInner(),this.emit("repaint"),this.render())},e.changeData=function(t){this.emit("beforedatachange",t),this.set("data",t),i.plugins.notify(this,"changeData"),this.emit("afterdatachange",t),this.set("_padding",null),this.repaint()},e.changeSize=function(t,e){return t?this.set("width",t):t=this.get("width"),e?this.set("height",e):e=this.get("height"),this.get("canvas").changeSize(t,e),this.emit("_aftersizechange",{width:t,height:e}),this.repaint(),this},e.destroy=function(){this.clear(),this.get("canvas").destroy(),i.plugins.notify(this,"afterCanvasDestroyed"),this._interactions&&h(this._interactions,(function(t){t.destroy()})),t.prototype.destroy.call(this)},e.getPosition=function(t){for(var e=this.get("coord"),i=this.getXScale(),n=i.field,r=this.getYScales(),o=r[0],s=o.field,a=0,l=r.length;a<l;a++){var c=r[a],h=c.field;if(t[h]){o=c,s=h;break}}var u=i.scale(t[n]),f=o.scale(t[s]);return e.convertPoint({x:u,y:f})},e.getRecord=function(t){var e=this.get("coord"),i=this.getXScale(),n=this.getYScales()[0],r=e.invertPoint(t),o={};return o[i.field]=i.invert(r.x),o[n.field]=n.invert(r.y),o},e.getSnapRecords=function(t){var e=this.get("geoms")[0],i=[];return e&&(i=e.getSnapRecords(t)),i},e.createScale=function(t){var e=this._getScaleData(t);return this.get("scaleController").createScale(t,e)},e.addGeom=function(t){this.get("geoms").push(t)},e.getXScale=function(){return this.get("geoms")[0].getXScale()},e.getYScales=function(){var t=this.get("geoms"),e=[];return h(t,(function(t){var i=t.getYScale();-1===e.indexOf(i)&&e.push(i)})),e},e.getLegendItems=function(){if(this.get("legendItems"))return this.get("legendItems");var t={},e=[];return h(this.get("geoms"),(function(i){var n=i.getAttr("color");if(n){var r=n.getScale("color");if(r.isCategory&&!function(t,e){var i=!1;return h(t,(function(t){var n=[].concat(t.values),r=[].concat(e.values);t.type!==e.type||t.field!==e.field||n.sort(Fn).toString()!==r.sort(Fn).toString()||(i=!0)})),i}(e,r)){e.push(r);var o=r.field,s=r.getTicks(),a=[];h(s,(function(t){var e=t.text,i=t.value,o=r.invert(i),s={fill:n.mapping(o).join("")||wt.defaultColor,radius:3,symbol:"circle",stroke:"#fff"};a.push({name:e,dataValue:o,checked:!0,marker:s})})),t[o]=a}}})),this.set("legendItems",t),t},e.registerPlugins=function(t){var e=this,n=e.get("plugins")||[];l(n)||(n=[n]),[].concat(t).forEach((function(t){-1===n.indexOf(t)&&(t.init&&t.init(e),n.push(t))})),i.plugins._cacheId++,e.set("plugins",n)},e._renderAxis=function(){var t=this.get("axisController"),e=this.getXScale(),n=this.getYScales(),r=this.get("coord");i.plugins.notify(this,"beforeRenderAxis"),t.createAxis(r,e,n)},e._isAutoPadding=function(){if(this.get("_padding"))return!1;var t=this.get("padding");return l(t)?-1!==t.indexOf("auto"):"auto"===t},e._updateLayout=function(t){var e=this.get("width"),i=this.get("height"),n={x:t[3],y:t[0]},r={x:e-t[1],y:i-t[2]},o=this.get("plot"),s=this.get("coord");o.reset(n,r),s.reset(o)},e.landscape=function(t){this.get("canvas").set("landscape",t)},i}(It);jn.plugins=jn.initPlugins();var Rn=function(){return null};function $n(t){var e=[],i=t.x,n=t.y;return(n=l(n)?n:[n]).forEach((function(t,n){var r={x:l(i)?i[n]:i,y:t};e.push(r)})),e}function Wn(t,e,i){if(!t.length)return[];var n,r=[],o=[];return h(t,(function(t){n=t._origin?t._origin[e]:t[e],i?a(n)||o.push(t):l(n)&&a(n[0])||a(n)?o.length&&(r.push(o),o=[]):o.push(t)})),o.length&&r.push(o),r}function Gn(t,e,i){if(0!==t.size){var n=function(t){var e={lineWidth:0,stroke:t.color,fill:t.color};return t.size&&(e.size=t.size),O(e,t.style),O({},wt.shape.point,e)}(t),r=n.r||n.size,o=t.x,s=l(t.y)?t.y:[t.y];"hollowCircle"===i&&(n.lineWidth=1,n.fill=null);for(var a=0,c=s.length;a<c;a++)return"rect"===i?e.addShape("Rect",{className:"point",attrs:O({x:o-r,y:s[a]-r,width:2*r,height:2*r},n)}):e.addShape("Circle",{className:"point",attrs:O({x:o,y:s[a],r:r},n)})}}wt.version,qt.registerFactory("point",{defaultShapeType:"circle",getDefaultPoints:function(t){return $n(t)}}),h(["circle","hollowCircle","rect"],(function(t){qt.registerShape("point",t,{draw:function(e,i){return Gn(e,i,t)}})}));var Vn=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.type="point",e.shapeType="point",e.generatePoints=!1,e},i.draw=function(t,e){var i=this,n=i.get("container");h(t,(function(t){var r=t.shape,o=i.getDrawCfg(t);if(l(t.y)){var s=i.hasAdjust("stack");h(t.y,(function(a,l){o.y=a,s&&0===l||i.drawShape(r,t,o,n,e)}))}else a(t.y)||i.drawShape(r,t,o,n,e)}))},e}(ne);ne.Point=Vn,qt.registerFactory("line",{defaultShapeType:"line"}),h(["line","smooth","dash"],(function(t){qt.registerShape("line",t,{draw:function(e,i){var n="smooth"===t,r=function(t){var e={strokeStyle:t.color};return t.size>=0&&(e.lineWidth=t.size),O(e,t.style),O({},wt.shape.line,e)}(e);return"dash"===t&&(r.lineDash=wt.lineDash),function(t,e,i,n){var r=t.points;if(r.length&&l(r[0].y)){for(var o=[],s=[],a=0,c=r.length;a<c;a++){var h=$n(r[a]);s.push(h[0]),o.push(h[1])}return t.isInCircle&&(o.push(o[0]),s.push(s[0])),t.isStack?e.addShape("Polyline",{className:"line",attrs:O({points:o,smooth:n},i)}):[e.addShape("Polyline",{className:"line",attrs:O({points:o,smooth:n},i)}),e.addShape("Polyline",{className:"line",attrs:O({points:s,smooth:n},i)})]}return t.isInCircle&&r.push(r[0]),e.addShape("Polyline",{className:"line",attrs:O({points:r,smooth:n},i)})}(e,i,r,n)}})}));var qn=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.type="path",e.shapeType="line",e},i.getDrawCfg=function(e){var i=t.prototype.getDrawCfg.call(this,e);return i.isStack=this.hasAdjust("stack"),i},i.draw=function(t,e){var i=this,n=i.get("container"),r=i.getYScale(),o=i.get("connectNulls"),s=Wn(t,r.field,o),a=this.getDrawCfg(t[0]);a.origin=t,h(s,(function(r,o){a.splitedIndex=o,a.points=r,i.drawShape(a.shape,t[0],a,n,e)}))},e}(ne);ne.Path=qn;var Un=function(t){function e(){return t.apply(this,arguments)||this}return Tt(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.type="line",e.sortable=!0,e},e}(qn);function Kn(t,e){return Math.abs(t-e)<1e-5}function Zn(t){return!isNaN(t)&&!a(t)}function Qn(t){for(var e=[],i=0,n=t.length;i<n;i++){var r=t[i];Zn(r.x)&&Zn(r.y)&&e.push(r)}return e}function Jn(t,e,i){var n=t.points,r=[],o=[];h(n,(function(t){o.push(t[0]),r.push(t[1])}));var s=O({fillStyle:t.color},wt.shape.area,t.style);return o.reverse(),r=this.parsePoints(r),o=this.parsePoints(o),t.isInCircle&&(r.push(r[0]),o.unshift(o[o.length-1]),function(t,e){var i=!0;return h(t,(function(t){if(!Kn(t.x,e.x)||!Kn(t.y,e.y))return i=!1,!1})),i}(o,t.center)&&(o=[])),function(t,e,i,n,r){var o=t.concat(e);return r?i.addShape("Custom",{className:"area",attrs:O({points:o},n),createPath:function(t){var e=[[0,0],[1,1]],i=Qn(this._attrs.attrs.points),n=i.length,r=i.slice(0,n/2),o=i.slice(n/2,n),s=mn(r,!1,e);t.beginPath(),t.moveTo(r[0].x,r[0].y);for(var a=0,l=s.length;a<l;a++){var c=s[a];t.bezierCurveTo(c[1],c[2],c[3],c[4],c[5],c[6])}if(o.length){var h=mn(o,!1,e);t.lineTo(o[0].x,o[0].y);for(var u=0,f=h.length;u<f;u++){var p=h[u];t.bezierCurveTo(p[1],p[2],p[3],p[4],p[5],p[6])}}t.closePath()},calculateBox:function(){return fn(Qn(this._attrs.attrs.points))}}):i.addShape("Polyline",{className:"area",attrs:O({points:o},n)})}(r,o,e,s,i)}ne.Line=Un,qt.registerFactory("area",{defaultShapeType:"area",getDefaultPoints:function(t){var e=t.x,i=t.y,n=t.y0;i=l(i)?i:[n,i];var r=[];return r.push({x:e,y:i[0]},{x:e,y:i[1]}),r}}),h(["area","smooth"],(function(t){qt.registerShape("area",t,{draw:function(e,i){var n="smooth"===t;return Jn.call(this,e,i,n)}})}));var tr=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.type="area",e.shapeType="area",e.generatePoints=!0,e.sortable=!0,e},i.draw=function(t,e){var i=this,n=i.get("container"),r=this.getDrawCfg(t[0]),o=i.getYScale(),s=i.get("connectNulls"),a=Wn(t,o.field,s);r.origin=t,h(a,(function(o,s){r.splitedIndex=s;var a=o.map((function(t){return t.points}));r.points=a,i.drawShape(r.shape,t[0],r,n,e)}))},e}(ne);ne.Area=tr;var er={initEvent:function(){var t=this,e=this.get("chart");e&&e.on("_aftersizechange",(function(){t.set("_width",null)}))},getDefaultSize:function(){var t=this.get("defaultSize");if(!t){var e=this.get("coord"),i=this.getXScale(),n=this.get("dataArray"),r=v(i.values).length,o=i.range,s=1/r,a=1;e&&e.isPolar?a=e.transposed&&r>1?wt.widthRatio.multiplePie:wt.widthRatio.rose:(i.isLinear&&(s*=o[1]-o[0]),a=wt.widthRatio.column),s*=a,this.hasAdjust("dodge")&&(s/=n.length),t=s,this.set("defaultSize",t)}return t},getDimWidth:function(t){var e=this.get("coord"),i=e.convertPoint({x:0,y:0}),n=e.convertPoint({x:"x"===t?1:0,y:"x"===t?0:1}),r=0;return i&&n&&(r=Math.sqrt(Math.pow(n.x-i.x,2)+Math.pow(n.y-i.y,2))),r},_getWidth:function(){var t=this.get("_width");if(!t){var e=this.get("coord");t=e&&e.isPolar&&!e.transposed?(e.endAngle-e.startAngle)*e.circleRadius:this.getDimWidth("x"),this.set("_width",t)}return t},_toNormalizedSize:function(t){return t/this._getWidth()},_toCoordSize:function(t){return this._getWidth()*t},getNormalizedSize:function(t){var e=this.getAttrValue("size",t);return e=a(e)?this.getDefaultSize():this._toNormalizedSize(e)},getSize:function(t){var e=this.getAttrValue("size",t);if(a(e)){var i=this.getDefaultSize();e=this._toCoordSize(i)}return e}};function ir(t){var e,i,n=t.x,r=t.y,o=t.y0,s=t.size,a=o,c=r;return l(r)&&(c=r[1],a=r[0]),l(n)?(e=n[0],i=n[1]):(e=n-s/2,i=n+s/2),[{x:e,y:a},{x:e,y:c},{x:i,y:c},{x:i,y:a}]}qt.registerFactory("interval",{defaultShapeType:"rect",getDefaultPoints:function(t){return ir(t)}}),qt.registerShape("interval","rect",{draw:function(t,e){var i=this.parsePoints(t.points),n=O({fill:t.color},wt.shape.interval,t.style);if(t.isInCircle){var r=i.slice(0);this._coord.transposed&&(r=[i[0],i[3],i[2],i[1]]);var o=t.center,s=o.x,a=o.y,l=[1,0],c=[r[0].x-s,r[0].y-a],h=[r[1].x-s,r[1].y-a],u=[r[2].x-s,r[2].y-a],f=Et.angleTo(l,h),p=Et.angleTo(l,u),d=Et.length(c),g=Et.length(h);return f>=1.5*Math.PI&&(f-=2*Math.PI),p>=1.5*Math.PI&&(p-=2*Math.PI),e.addShape("Sector",{className:"interval",attrs:O({x:s,y:a,r:g,r0:d,startAngle:f,endAngle:p},n)})}var v=function(t){for(var e=[],i=[],n=0,r=t.length;n<r;n++){var o=t[n];e.push(o.x),i.push(o.y)}var s=Math.min.apply(null,e),a=Math.min.apply(null,i);return{x:s,y:a,width:Math.max.apply(null,e)-s,height:Math.max.apply(null,i)-a}}(i);return e.addShape("rect",{className:"interval",attrs:O(v,n)})}}),["pyramid","funnel"].forEach((function(t){qt.registerShape("interval",t,{getPoints:function(t){return t.size=2*t.size,ir(t)},draw:function(e,i){var n,r,o=this.parsePoints(e.points),s=this.parsePoints(e.nextPoints),a=null;s?a=[o[0],o[1],s[1],s[0]]:(a=[o[0],o[1]],"pyramid"===t?a.push((n=o[2],r=o[3],{x:(n.x-r.x)/2+r.x,y:(n.y-r.y)/2+r.y})):a.push(o[2],o[3]));var l=O({fill:e.color,points:a},wt.shape.interval,e.style);return i.addShape("polygon",{className:"interval",attrs:l})}})}));var nr=function(t){Tt(i,t);var e=i.prototype;function i(e){var i;return O(Mt(i=t.call(this,e)||this),er),i}return e.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.type="interval",e.shapeType="interval",e.generatePoints=!0,e},e.init=function(){t.prototype.init.call(this),this.initEvent()},e.createShapePointsCfg=function(e){var i=t.prototype.createShapePointsCfg.call(this,e);return i.size=this.getNormalizedSize(e),i},e.clearInner=function(){t.prototype.clearInner.call(this),this.set("defaultSize",null)},i}(ne);ne.Interval=nr,qt.registerFactory("polygon",{defaultShapeType:"polygon",getDefaultPoints:function(t){for(var e=[],i=t.x,n=t.y,r=0,o=i.length;r<o;r++)e.push({x:i[r],y:n[r]});return e}}),qt.registerShape("polygon","polygon",{draw:function(t,e){var i=this.parsePoints(t.points),n=O({fill:t.color,points:i},t.style);return e.addShape("Polygon",{className:"polygon",attrs:n})}});var rr=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.type="polygon",e.shapeType="polygon",e.generatePoints=!0,e},i.createShapePointsCfg=function(e){var i,n=t.prototype.createShapePointsCfg.call(this,e),r=n.x,o=n.y;if(!l(r)||!l(o)){var s=this.getXScale(),a=this.getYScale(),c=.5/(s.values?s.values.length:s.ticks.length),h=.5/(a.values?a.values.length:a.ticks.length);s.isCategory&&a.isCategory?(r=[r-c,r-c,r+c,r+c],o=[o-h,o+h,o+h,o-h]):l(r)?(r=[(i=r)[0],i[0],i[1],i[1]],o=[o-h/2,o+h/2,o+h/2,o-h/2]):l(o)&&(o=[(i=o)[0],i[1],i[1],i[0]],r=[r-c/2,r-c/2,r+c/2,r+c/2]),n.x=r,n.y=o}return n},e}(ne);ne.Polygon=rr,qt.registerFactory("schema",{}),qt.registerShape("schema","candle",{getPoints:function(t){return e=t.x,i=t.y,n=t.size,r=function(t){var e=t.sort((function(t,e){return t<e?1:-1})),i=e.length;if(i<4)for(var n=e[i-1],r=0;r<4-i;r++)e.push(n);return e}(i),[{x:e,y:r[0]},{x:e,y:r[1]},{x:e-n/2,y:r[2]},{x:e-n/2,y:r[1]},{x:e+n/2,y:r[1]},{x:e+n/2,y:r[2]},{x:e,y:r[2]},{x:e,y:r[3]}];var e,i,n,r},draw:function(t,e){var i=this.parsePoints(t.points),n=O({stroke:t.color,fill:t.color,lineWidth:1},t.style);return e.addShape("Custom",{className:"schema",attrs:n,createPath:function(t){t.beginPath(),t.moveTo(i[0].x,i[0].y),t.lineTo(i[1].x,i[1].y),t.moveTo(i[2].x,i[2].y);for(var e=3;e<6;e++)t.lineTo(i[e].x,i[e].y);t.closePath(),t.moveTo(i[6].x,i[6].y),t.lineTo(i[7].x,i[7].y)}})}});var or=function(t){Tt(i,t);var e=i.prototype;function i(e){var i;return O(Mt(i=t.call(this,e)||this),er),i}return e.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.type="schema",e.shapeType="schema",e.generatePoints=!0,e},e.init=function(){t.prototype.init.call(this),this.initEvent()},e.createShapePointsCfg=function(e){var i=t.prototype.createShapePointsCfg.call(this,e);return i.size=this.getNormalizedSize(e),i},e.clearInner=function(){t.prototype.clearInner.call(this),this.set("defaultSize",null)},i}(ne);ne.Schema=or;var sr={}.toString,ar=function(t,e){return sr.call(t)==="[object "+e+"]"},lr=Array.isArray?Array.isArray:function(t){return ar(t,"Array")},cr=function(t){return null==t},hr=function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r._initDefaultCfg=function(){this.xField=null,this.yField=null},r.processAdjust=function(t){this.processStack(t)},r.processStack=function(t){var e=this.xField,i=this.yField,n=t.length,r={positive:{},negative:{}};this.reverseOrder&&(t=t.slice(0).reverse());for(var o=0;o<n;o++)for(var s=t[o],a=0,l=s.length;a<l;a++){var c=s[a],h=c[e]||0,u=c[i],f=h.toString();if(u=lr(u)?u[1]:u,!cr(u)){var p=u>=0?"positive":"negative";r[p][f]||(r[p][f]=0),c[i]=[r[p][f],u+r[p][f]],r[p][f]+=u}}},n}(Jt);Jt.Stack=hr;var ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fr=function(t){var e=void 0===t?"undefined":ur(t);return null!==t&&"object"===e||"function"===e},pr=function(t,e){if(t)if(lr(t))for(var i=0,n=t.length;i<n&&!1!==e(t[i],i);i++);else if(fr(t))for(var r in t)if(t.hasOwnProperty(r)&&!1===e(t[r],r))break},dr=function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r._initDefaultCfg=function(){this.marginRatio=.5,this.dodgeRatio=.5,this.adjustNames=["x","y"]},r.getDodgeOffset=function(t,e,i){var n=t.pre,r=t.next,o=r-n,s=o*this.dodgeRatio/i,a=this.marginRatio*s;return(n+r)/2+(.5*(o-i*s-(i-1)*a)+((e+1)*s+e*a)-.5*s-.5*o)},r.processAdjust=function(t){var e=this,i=t.length,n=e.xField;pr(t,(function(t,r){for(var o=0,s=t.length;o<s;o++){var a=t[o],l=a[n],c={pre:1===s?l-1:l-.5,next:1===s?l+1:l+.5},h=e.getDodgeOffset(c,r,i);a[n]=h}}))},n}(Jt);Jt.Dodge=dr;var gr=function(t){return ar(t,"Function")},vr=function(t,e){if(lr(t)){var i=t[0],n=void 0;n=gr(e)?e(t[0]):t[0][e];var r=void 0;return pr(t,(function(t){(r=gr(e)?e(t):t[e])>n&&(i=t,n=r)})),i}},mr={merge:function(t){for(var e=[],i=0;i<t.length;i++)e=e.concat(t[i]);return e}},yr=function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r._initDefaultCfg=function(){this.xField=null,this.yField=null,this.cacheMax=null,this.adjustNames=["y"],this.groupFields=null},r._getMax=function(t){var e=this.mergeData,i=vr(e,(function(e){var i=e[t];return lr(i)?Math.max.apply(null,i):i}))[t];return lr(i)?Math.max.apply(null,i):i},r._getXValuesMax=function(){var t=this.yField,e=this.xField,i={},n=this.mergeData;return pr(n,(function(n){var r=n[e],o=n[t],s=lr(o)?Math.max.apply(null,o):o;i[r]=i[r]||0,i[r]<s&&(i[r]=s)})),i},r.processAdjust=function(t){var e=mr.merge(t);this.mergeData=e,this._processSymmetric(t),this.mergeData=null},r._processSymmetric=function(t){var e,i=this.xField,n=this.yField,r=this._getMax(n),o=t[0][0];o&&lr(o[n])&&(e=this._getXValuesMax()),pr(t,(function(t){pr(t,(function(t){var o,s=t[n];if(lr(s)){var a=t[i],l=e[a];o=(r-l)/2;var c=[];pr(s,(function(t){c.push(o+t)})),t[n]=c}else o=(r-s)/2,t[n]=[o,s+o]}))}))},n}(Jt);Jt.Symmetric=yr;var xr=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initDefaultCfg=function(){this.type="polar",this.startAngle=-Math.PI/2,this.endAngle=3*Math.PI/2,this.inner=0,this.innerRadius=0,this.isPolar=!0,this.transposed=!1,this.center=null,this.radius=null},i.init=function(e,i){t.prototype.init.call(this,e,i);var n,r,o=this.inner||this.innerRadius,s=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);this.startAngle===-Math.PI&&0===this.endAngle?(n=Math.min(s/2,a),r={x:(e.x+i.x)/2,y:e.y}):(n=Math.min(s,a)/2,r={x:(e.x+i.x)/2,y:(e.y+i.y)/2});var l=this.radius;l>0&&l<=1&&(n*=l),this.x={start:this.startAngle,end:this.endAngle},this.y={start:n*o,end:n},this.center=r,this.circleRadius=n},i._convertPoint=function(t){var e=this.center,i=this.transposed,n=i?"y":"x",r=i?"x":"y",o=this.x,s=this.y,a=o.start+(o.end-o.start)*t[n],l=s.start+(s.end-s.start)*t[r];return{x:e.x+Math.cos(a)*l,y:e.y+Math.sin(a)*l}},i._invertPoint=function(t){var e=this.center,i=this.transposed,n=this.x,r=this.y,o=i?"y":"x",s=i?"x":"y",a=[1,0,0,1,0,0];Ot.rotate(a,a,n.start);var l=[1,0];Et.transformMat2d(l,l,a),l=[l[0],l[1]];var c=[t.x-e.x,t.y-e.y];if(Et.zero(c))return{x:0,y:0};var h=Et.angleTo(l,c,n.end<n.start);Math.abs(h-2*Math.PI)<.001&&(h=0);var u=Et.length(c),f=h/(n.end-n.start);f=n.end-n.start>0?f:-f;var p=(u-r.start)/(r.end-r.start),d={};return d[o]=f,d[s]=p,d},e}(Bt);Bt.Polar=xr;var br=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initDefaultCfg=function(){t.prototype._initDefaultCfg.call(this),this.startAngle=-Math.PI/2,this.endAngle=3*Math.PI/2,this.radius=null,this.center=null},i.getOffsetPoint=function(t){var e=this.startAngle,i=e+(this.endAngle-e)*t;return this._getCirclePoint(i)},i._getCirclePoint=function(t,e){var i=this.center;return e=e||this.radius,{x:i.x+Math.cos(t)*e,y:i.y+Math.sin(t)*e}},i.getTextAlignInfo=function(t,e){var i,n=this.getOffsetVector(t,e),r="middle";return n[0]>0?i="left":n[0]<0?i="right":(i="center",n[1]>0?r="top":n[1]<0&&(r="bottom")),{textAlign:i,textBaseline:r}},i.getAxisVector=function(t){var e=this.center,i=this.offsetFactor;return[(t.y-e.y)*i,-1*(t.x-e.x)*i]},i.drawLine=function(t){var e=this.center,i=this.radius,n=this.startAngle,r=this.endAngle;this.getContainer(t.top).addShape("arc",{className:"axis-line",attrs:O({x:e.x,y:e.y,r:i,startAngle:n,endAngle:r},t)})},e}(Fi);Fi.Circle=br;var Sr={min:0,median:.5,max:1},wr=function(){var t=e.prototype;function e(t){this._initDefaultCfg(),A(this,t)}return t._initDefaultCfg=function(){},t._getNormalizedValue=function(t,e){return a(Sr[t])?e.scale(t):Sr[t]},t.parsePercentPoint=function(t,e){var i=parseFloat(e[0])/100,n=parseFloat(e[1])/100,r=t.start,o=t.end,s=Math.abs(r.x-o.x),a=Math.abs(r.y-o.y);return{x:s*i+Math.min(r.x,o.x),y:a*n+Math.min(r.y,o.y)}},t.parsePoint=function(t,e){var i=this.xScale,n=this.yScales;if(s(e)&&(e=e(i,n)),g(e[0])&&-1!==e[0].indexOf("%")&&!isNaN(e[0].slice(0,-1)))return this.parsePercentPoint(t,e);var r=this._getNormalizedValue(e[0],i),o=this._getNormalizedValue(e[1],n[0]),a=t.convertPoint({x:r,y:o});return this.limitInPlot?r>=0&&r<=1&&o>=0&&o<=1?a:null:a},t.render=function(){},t.repaint=function(){this.remove();var t=this.coord,e=this.container,i=this.canvas;e&&!e.isDestroyed()&&(this.render(t,e),i.draw())},t.remove=function(){var t=this.element;t&&t.remove(!0)},t.changeVisible=function(t){this.visible=t;var e=this.element;e&&(e.set?e.set("visible",t):e.style.display=t?"":"none")},e}(),kr=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initDefaultCfg=function(){this.type="arc",this.start=[],this.end=[],this.style={stroke:"#999",lineWidth:1}},i.render=function(t,e){var i=this.parsePoint(t,this.start),n=this.parsePoint(t,this.end);if(i&&n){var r=t.center,o=Math.sqrt((i.x-r.x)*(i.x-r.x)+(i.y-r.y)*(i.y-r.y)),s=Math.atan2(i.y-r.y,i.x-r.x),a=Math.atan2(n.y-r.y,n.x-r.x),l=e.addShape("arc",{className:"guide-arc",attrs:O({x:r.x,y:r.y,r:o,startAngle:s,endAngle:a},this.style)});return this.element=l,l}},e}(wr);function Cr(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style[i]=e[i]);return t}function Tr(t){var e=document.createElement("div");return t=t.replace(/(^\s*)|(\s*$)/g,""),e.innerHTML=""+t,e.childNodes[0]}wr.Arc=kr;var Pr=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initDefaultCfg=function(){this.type="html",this.position=null,this.alignX="center",this.alignY="middle",this.offsetX=null,this.offsetY=null,this.html=null},i.render=function(t,e){var i=this.parsePoint(t,this.position);if(i){var n=Tr(this.html);n=Cr(n,{position:"absolute",top:Math.floor(i.y)+"px",left:Math.floor(i.x)+"px",visibility:"hidden"});var r=e.get("canvas").get("el"),o=r.parentNode;o=Cr(o,{position:"relative"});var s=Tr('<div class="guideWapper" style="position: absolute;top: 0; left: 0;"></div>');o.appendChild(s),s.appendChild(n);var a=r.offsetTop,l=r.offsetLeft,c=this.alignX,h=this.alignY,u=this.offsetX,f=this.offsetY,p=function(t,e,i,n){var r=[];return"left"===t&&"top"===e?(r[0]=0,r[1]=0):"right"===t&&"top"===e?(r[0]=-i,r[1]=0):"left"===t&&"bottom"===e?(r[0]=0,r[1]=Math.floor(-n)):"right"===t&&"bottom"===e?(r[0]=Math.floor(-i),r[1]=Math.floor(-n)):"right"===t&&"middle"===e?(r[0]=Math.floor(-i),r[1]=Math.floor(-n/2)):"left"===t&&"middle"===e?(r[0]=0,r[1]=Math.floor(-n/2)):"center"===t&&"bottom"===e?(r[0]=Math.floor(-i/2),r[1]=Math.floor(-n)):"center"===t&&"top"===e?(r[0]=Math.floor(-i/2),r[1]=0):(r[0]=Math.floor(-i/2),r[1]=Math.floor(-n/2)),r}(c,h,ot(n),st(n));i.x=i.x+p[0]+l,i.y=i.y+p[1]+a,u&&(i.x+=u),f&&(i.y+=f),Cr(n,{top:Math.floor(i.y)+"px",left:Math.floor(i.x)+"px",visibility:"visible"}),this.element=s}},i.remove=function(){var t=this.element;t&&t.parentNode&&t.parentNode.removeChild(t)},e}(wr);wr.Html=Pr;var Mr=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initDefaultCfg=function(){this.type="line",this.start=[],this.end=[],this.style={stroke:"#000",lineWidth:1}},i.render=function(t,e){var i=[];if(i[0]=this.parsePoint(t,this.start),i[1]=this.parsePoint(t,this.end),i[0]&&i[1]){var n=e.addShape("Line",{className:"guide-line",attrs:O({x1:i[0].x,y1:i[0].y,x2:i[1].x,y2:i[1].y},this.style)});return this.element=n,n}},e}(wr);wr.Line=Mr;var _r=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initDefaultCfg=function(){this.type="rect",this.start=[],this.end=[],this.style={fill:"#CCD7EB",opacity:.4}},i.render=function(t,e){var i=this.parsePoint(t,this.start),n=this.parsePoint(t,this.end);if(i&&n){var r=e.addShape("rect",{className:"guide-rect",attrs:O({x:Math.min(i.x,n.x),y:Math.min(i.y,n.y),width:Math.abs(n.x-i.x),height:Math.abs(i.y-n.y)},this.style)});return this.element=r,r}},e}(wr);wr.Rect=_r;var Ir=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initDefaultCfg=function(){this.type="text",this.position=null,this.content=null,this.style={fill:"#000"},this.offsetX=0,this.offsetY=0},i.render=function(t,e){var i=this.position,n=this.parsePoint(t,i);if(n){var r=this.content,o=this.style,s=this.offsetX,a=this.offsetY;s&&(n.x+=s),a&&(n.y+=a);var l=e.addShape("text",{className:"guide-text",attrs:O({x:n.x,y:n.y,text:r},o)});return this.element=l,l}},e}(wr);wr.Text=Ir;var Dr=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initDefaultCfg=function(){this.type="tag",this.position=null,this.content=null,this.direct="tl",this.autoAdjust=!0,this.offsetX=0,this.offsetY=0,this.side=4,this.background={padding:5,radius:2,fill:"#1890FF"},this.textStyle={fontSize:12,fill:"#fff",textAlign:"center",textBaseline:"middle"},this.withPoint=!0,this.pointStyle={fill:"#1890FF",r:3,lineWidth:1,stroke:"#fff"}},i._getDirect=function(t,e,i,n){var r=this.direct,o=this.side,s=t.get("canvas"),a=s.get("width"),l=s.get("height"),c=e.x,h=e.y,u=r[0],f=r[1];"t"===u&&h-o-n<0?u="b":"b"===u&&h+o+n>l&&(u="t");var p="c"===u?o:0;return"l"===f&&c-p-i<0?f="r":"r"===f&&c+p+i>a?f="l":"c"===f&&(i/2+c+p>a?f="l":c-i/2-p<0&&(f="r")),r=u+f},i.render=function(t,e){var i=this.parsePoint(t,this.position);if(i&&!isNaN(i.x)&&!isNaN(i.y)){var n=this.content,r=this.background,o=this.textStyle,s=[],a=e.addGroup({className:"guide-tag"});if(this.withPoint){var l=a.addShape("Circle",{className:"guide-tag-point",attrs:O({x:i.x,y:i.y},this.pointStyle)});s.push(l)}var c=a.addGroup(),h=c.addShape("text",{className:"guide-tag-text",zIndex:1,attrs:O({x:0,y:0,text:n},o)});s.push(h);var u=h.getBBox(),f=gt(r.padding),p=u.width+f[1]+f[3],d=u.height+f[0]+f[2],g=u.minY-f[0],v=u.minX-f[3],m=c.addShape("rect",{className:"guide-tag-bg",zIndex:-1,attrs:O({x:v,y:g,width:p,height:d},r)});s.push(m);var y,x=this.autoAdjust?this._getDirect(e,i,p,d):this.direct,b=this.side,S=i.x+this.offsetX,w=i.y+this.offsetY,k=gt(r.radius);"tl"===x?(y=[{x:p+v-b-1,y:d+g-1},{x:p+v,y:d+g-1},{x:p+v,y:d+b+g}],k[2]=0,S-=p,w=w-b-d):"cl"===x?(y=[{x:p+v-1,y:(d-b)/2+g-1},{x:p+v-1,y:(d+b)/2+g+1},{x:p+b+v,y:d/2+g}],S=S-p-b,w-=d/2):"bl"===x?(y=[{x:p+v,y:-b+g},{x:p+v-b-1,y:g+1},{x:p+v,y:g+1}],k[1]=0,S-=p,w+=b):"bc"===x?(y=[{x:p/2+v,y:-b+g},{x:(p-b)/2+v-1,y:g+1},{x:(p+b)/2+v+1,y:g+1}],S-=p/2,w+=b):"br"===x?(y=[{x:v,y:g-b},{x:v,y:g+1},{x:v+b+1,y:g+1}],k[0]=0,w+=b):"cr"===x?(y=[{x:v-b,y:d/2+g},{x:v+1,y:(d-b)/2+g-1},{x:v+1,y:(d+b)/2+g+1}],S+=b,w-=d/2):"tr"===x?(y=[{x:v,y:d+b+g},{x:v,y:d+g-1},{x:b+v+1,y:d+g-1}],k[3]=0,w=w-d-b):"tc"===x&&(y=[{x:(p-b)/2+v-1,y:d+g-1},{x:(p+b)/2+v+1,y:d+g-1},{x:p/2+v,y:d+b+g}],S-=p/2,w=w-d-b);var C=c.addShape("Polygon",{className:"guide-tag-side",zIndex:0,attrs:{points:y,fill:r.fill}});return s.push(C),m.attr("radius",k),c.moveTo(S-v,w-g),c.sort(),this.element=a,s}},e}(wr);wr.Tag=Dr;var Or=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i._initDefaultCfg=function(){this.type="point",this.position=null,this.offsetX=0,this.offsetY=0,this.style={fill:"#1890FF",r:3,lineWidth:1,stroke:"#fff"}},i.render=function(t,e){var i=this.parsePoint(t,this.position);if(!i)return null;var n=e.addShape("Circle",{className:"guide-point",attrs:O({x:i.x+this.offsetX,y:i.y+this.offsetY},this.style)});return this.element=n,n},e}(wr);wr.Point=Or;var Er=function(){var t=e.prototype;function e(t){A(this,this.getDefaultCfg(),t),this._init(),this._renderTitle(),this._renderItems()}return t.getDefaultCfg=function(){return{showTitle:!1,title:null,items:null,titleGap:12,itemGap:10,itemMarginBottom:12,itemFormatter:null,itemWidth:null,wordSpace:6,x:0,y:0,layout:"horizontal",joinString:": "}},t._init=function(){var t=this.parent;if(t){var e=t.addGroup({zIndex:this.zIndex||0});this.container=e;var i=e.addGroup();this.wrapper=i;var n=i.addGroup({className:"itemsGroup"});this.itemsGroup=n}},t._renderTitle=function(t){t=t||this.title;var e=this.titleShape,i=0;if(this.showTitle&&t){if(e&&!e.get("destroyed"))e.attr("text",t);else{var n=this.wrapper,r=this.titleStyle;e=n.addShape("text",{className:"title",attrs:O({x:0,y:0,text:t},r)}),this.titleShape=e}i=e.getBBox().height+this.titleGap}this._titleHeight=i},t._renderItems=function(t){var e=this;(t=t||e.items)&&(e.reversed&&t.reverse(),h(t,(function(t,i){e._addItem(t,i)})),t.length>1&&this._adjustItems(),this._renderBackground())},t._renderBackground=function(){var t=this.background;if(t){var e=this.container,i=this.wrapper.getBBox(),n=i.minX,r=i.minY,o=i.width,s=i.height,a=t.padding||[0,0,0,0],l=O({x:n-(a=gt(a))[3],y:r-a[0],width:o+a[1]+a[3],height:s+a[0]+a[2]},t),c=this.backShape;c?c.attr(l):c=e.addShape("Rect",{zIndex:-1,attrs:l}),this.backShape=c,e.sort()}},t._addItem=function(t){var e,i=this.itemsGroup.addGroup({name:t.name,value:t.value,dataValue:t.dataValue,checked:t.checked}),n=this.unCheckStyle,r=this.unCheckColor,o=this.nameStyle,s=this.valueStyle,a=this.wordSpace,l=t.marker,c=t.value,h=0;if(r&&(n.fill=r),l){var u=O({x:l.radius||3,y:this._titleHeight},l);!1===t.checked&&O(u,n),h+=i.addShape("marker",{className:"item-marker",attrs:u}).getBBox().width+a}var f=t.name;if(f){var p=this.joinString||"";f=c?f+p:f,e=i.addShape("text",{className:"name",attrs:O({x:h,y:this._titleHeight,text:this._formatItemValue(f)},o,!1===t.checked?n:null)})}if(c){var d=h;e&&(d+=e.getBBox().width),i.addShape("text",{className:"value",attrs:O({x:d,y:this._titleHeight,text:c},s,!1===t.checked?n:null)})}return i},t._formatItemValue=function(t){var e=this.itemFormatter;return e&&(t=e.call(this,t)),t},t._getMaxItemWidth=function(){var t=this.itemWidth;if(b(t)||a(t))return t;if("auto"===t){for(var e=this.itemsGroup.get("children"),i=e.length,n=0,r=0;r<i;r++){var o=e[r].getBBox().width;n=Math.max(n,o)}var s=this.maxLength,l=this.itemGap,c=(s-l)/2,h=(s-2*l)/3;return 2===i?Math.max(n,c):n<=h?h:n<=c?c:n}},t._adjustHorizontal=function(){for(var t,e,i=this.maxLength,n=this.itemsGroup.get("children"),r=this.itemGap,o=this.itemMarginBottom,s=this._titleHeight,a=0,l=0,c=this._getMaxItemWidth(),h=[],u=0,f=n.length;u<f;u++){var p=n[u],d=p.getBBox(),g=d.height,v=d.width;e=g+o,(t=c||v)-(i-l)>1e-4&&(a++,l=0),p.moveTo(l,a*e),h.push({x:l,y:a*e+s-g/2,width:1.375*v,height:1.375*g}),l+=t+r}this.legendHitBoxes=h},t._adjustVertical=function(){for(var t,e,i=this.maxLength,n=this.itemsGroup,r=this.itemGap,o=this.itemMarginBottom,s=this.itemWidth,a=this._titleHeight,l=n.get("children"),c=0,h=0,u=0,f=[],p=0,d=l.length;p<d;p++){var g=l[p],v=g.getBBox();t=v.width,e=v.height,b(s)?h=s+r:t>h&&(h=t+r),i-c<e?(c=0,u+=h,g.moveTo(u,0),f.push({x:u,y:a-e/2,width:1.375*t,height:1.375*e})):(g.moveTo(u,c),f.push({x:u,y:c-e/2+a,width:1.375*t,height:1.375*e})),c+=e+o}this.legendHitBoxes=f},t._adjustItems=function(){"horizontal"===this.layout?this._adjustHorizontal():this._adjustVertical()},t.moveTo=function(t,e){this.x=t,this.y=e;var i=this.container;return i&&i.moveTo(t,e),this},t.setItems=function(t){this.clearItems(),this._renderItems(t)},t.setTitle=function(t){this._renderTitle(t)},t.clearItems=function(){this.itemsGroup.clear()},t.getWidth=function(){return this.container.getBBox().width},t.getHeight=function(){return this.container.getBBox().height},t.show=function(){this.container.show()},t.hide=function(){this.container.hide()},t.clear=function(){var t=this.container;t.clear(),t.remove(!0)},e}(),Ar=function(){var t=e.prototype;function e(t){A(this,this.getDefaultCfg(),t),this._init();var e=this.content,i=this.x,n=this.y;a(e)||this.updateContent(e),this.updatePosition(i,n)}return t.getDefaultCfg=function(){return{x:0,y:0,content:"",textStyle:{fontSize:12,fill:"#fff",textAlign:"center",textBaseline:"middle",fontFamily:"Arial"},background:{radius:1,fill:"rgba(0, 0, 0, 0.65)",padding:[3,5]},width:0,height:0,className:""}},t._init=function(){var t=this.content,e=this.textStyle,i=this.background,n=this.className,r=this.visible,o=this.context,s=new On({context:o,className:n,zIndex:0,visible:r}),a=s.addShape("Text",{className:n+"-text",zIndex:1,attrs:O({text:t,x:0,y:0},e)}),l=s.addShape("Rect",{className:n+"-bg",zIndex:-1,attrs:O({x:0,y:0,width:0,height:0},i)});s.sort(),this.container=s,this.textShape=a,this.backgroundShape=l},t._getBBox=function(){var t=this.textShape,e=this.background,i=t.getBBox(),n=gt(e.padding),r=i.width+n[1]+n[3],o=i.height+n[0]+n[2];return{x:i.minX-n[3],y:i.minY-n[0],width:r,height:o}},t.updateContent=function(t){var e=this.textShape,i=this.backgroundShape;if(!a(t)){c(t)||(t={text:t}),e.attr(t);var n=this._getBBox(),r=n.x,o=n.y,s=n.width,l=n.height,h=this.width||s,u=this.height||l;i.attr({x:r,y:o,width:h,height:u}),this._width=h,this._height=u,this.content=t.text}},t.updatePosition=function(t,e){var i=this.container,n=this._getBBox(),r=n.x,o=n.y;i.moveTo(t-r,e-o),this.x=t-r,this.y=e-o},t.getWidth=function(){return this._width},t.getHeight=function(){return this._height},t.show=function(){this.container.show()},t.hide=function(){this.container.hide()},t.clear=function(){var t=this.container;t.clear(),t.remove(!0),this.container=null,this.textShape=null,this.backgroundShape=null},e}(),Br=function(){var t=e.prototype;function e(t){A(this,this.getDefaultCfg(),t);var e=this.frontPlot;if(!this.custom){var i=new Er(O({parent:e,zIndex:3},t));this.container=i;var n=this.fixed,r=this.background;n||(this.tooltipArrow=e.addShape("Polygon",{className:"tooltip-arrow",visible:!1,zIndex:2,attrs:O({points:[]},r)}))}if(this.showXTip){var o=this.xTipBackground,s=this.xTipTextStyle,a=new Ar({context:e.get("context"),className:"xTip",background:o,textStyle:s,visible:!1});e.add(a.container),this.xTipBox=a}if(this.showYTip){var l=this.yTipBackground,c=this.yTipTextStyle,h=new Ar({context:e.get("context"),className:"yTip",background:l,textStyle:c,visible:!1});e.add(h.container),this.yTipBox=h}this.showCrosshairs&&this._renderCrosshairs(),e.sort()}return t.getDefaultCfg=function(){return{showCrosshairs:!1,crosshairsStyle:{stroke:"rgba(0, 0, 0, 0.25)",lineWidth:1},crosshairsType:"y",showXTip:!1,showYTip:!1,xTip:null,xTipBackground:{radius:1,fill:"rgba(0, 0, 0, 0.65)",padding:[3,5]},xTipTextStyle:{fontSize:12,fill:"#fff",textAlign:"center",textBaseline:"middle"},yTip:null,yTipBackground:{radius:1,fill:"rgba(0, 0, 0, 0.65)",padding:[3,5]},yTipTextStyle:{fontSize:12,fill:"#fff",textAlign:"center",textBaseline:"middle"},background:null,layout:"horizontal",offsetX:0,offsetY:0}},t.setContent=function(t,e){if(this.title=t,this.items=e,!this.custom){var i=this.container;i.setTitle(t),i.setItems(e)}},t.setYTipContent=function(t){var e=this.yTip;t=s(e)?e(t):O({text:t},e),this.yTipBox&&this.yTipBox.updateContent(t)},t.setYTipPosition=function(t){var e=this.plotRange,i=this.crosshairsShapeX;if(this.showYTip){var n=this.yTipBox,r=n.getHeight(),o=n.getWidth(),s=e.tl.x-o,a=t-r/2;a<=e.tl.y&&(a=e.tl.y),a+r>=e.br.y&&(a=e.br.y-r),s<0&&(s=e.tl.x,i&&i.attr("x1",e.tl.x+o)),n.updatePosition(s,a)}},t.setXTipContent=function(t){var e=this.xTip;t=s(e)?e(t):O({text:t},e),this.xTipBox&&this.xTipBox.updateContent(t)},t.setXTipPosition=function(t){var e=this.showXTip,i=this.canvas,n=this.plotRange,r=this.xTipBox,o=this.crosshairsShapeY;if(e){var s=i.get("height"),a=r.getWidth(),l=r.getHeight(),c=t-a/2,h=n.br.y;c<=n.tl.x&&(c=n.tl.x),c+a>=n.tr.x&&(c=n.tr.x-a),s-h<l&&(h-=l),r.updatePosition(c,h),o&&o.attr("y1",h)}},t.setXCrosshairPosition=function(t){this.crosshairsShapeX&&this.crosshairsShapeX.moveTo(0,t)},t.setYCrosshairPosition=function(t){this.crosshairsShapeY&&this.crosshairsShapeY.moveTo(t,0)},t.setPosition=function(t){var e=this.container,i=this.plotRange,n=this.offsetX,r=this.offsetY,o=this.fixed,s=this.tooltipArrow;if(e){var a,l=e.container.getBBox(),c=l.minX,h=l.minY,u=l.width,f=l.height,p=i.tl,d=i.tr,g=0,v=p.y-f-4+r;if(v<0&&(v=0),o)g=(p.x+d.x)/2-u/2+n;else if((g=(a=t.length>1?(t[0].x+t[t.length-1].x)/2:t[0].x)-u/2+n)<p.x&&(g=p.x),g+u>d.x&&(g=d.x-u),s){var m=v+f;s.attr("points",[{x:a-3,y:m},{x:a+3,y:m},{x:a,y:m+4}]);var y=e.backShape,x=gt(y.attr("radius"));a===p.x?(x[3]=0,s.attr("points",[{x:p.x,y:m},{x:p.x+4,y:m},{x:p.x,y:m+4}])):a===d.x&&(x[2]=0,s.attr("points",[{x:d.x-4,y:m},{x:d.x,y:m},{x:d.x,y:m+4}])),y.attr("radius",x)}e.moveTo(g-c,v-h)}},t.setMarkers=function(t){void 0===t&&(t={});var e=t,i=e.items,n=e.style,r=e.type,o=this._getMarkerGroup(r);if("circle"===r)for(var s=0,a=i.length;s<a;s++){var l=i[s];o.addShape("marker",{className:"tooltip-circle-marker",attrs:O({x:l.x,y:l.y,stroke:l.color},n)})}else o.addShape("rect",{className:"tooltip-rect-marker",attrs:n})},t.clearMarkers=function(){var t=this.markerGroup;t&&t.clear()},t.show=function(){var t=this.crosshairsShapeX,e=this.crosshairsShapeY,i=this.markerGroup,n=this.container,r=this.tooltipArrow,o=this.xTipBox,s=this.yTipBox,a=this.canvas;t&&t.show(),e&&e.show(),i&&i.show(),n&&n.show(),r&&r.show(),o&&o.show(),s&&s.show(),a.draw()},t.hide=function(){var t=this.crosshairsShapeX,e=this.crosshairsShapeY,i=this.markerGroup,n=this.container,r=this.tooltipArrow,o=this.xTipBox,s=this.yTipBox;t&&t.hide(),e&&e.hide(),i&&i.hide(),n&&n.hide(),r&&r.hide(),o&&o.hide(),s&&s.hide()},t.destroy=function(){var t=this.crosshairsShapeX,e=this.crosshairsShapeY,i=this.markerGroup,n=this.container,r=this.tooltipArrow,o=this.xTipBox,s=this.yTipBox;t&&t.remove(!0),e&&e.remove(!0),i&&i.remove(!0),r&&r.remove(!0),n&&n.clear(),o&&o.clear(),s&&s.clear(),this.destroyed=!0},t._getMarkerGroup=function(t){var e=this.markerGroup;return e?e.clear():("circle"===t?(e=this.frontPlot.addGroup({zIndex:1}),this.frontPlot.sort()):e=this.backPlot.addGroup(),this.markerGroup=e),e},t._renderCrosshairs=function(){var t=this.crosshairsType,e=this.crosshairsStyle,i=this.frontPlot,n=this.plotRange,r=n.tl,o=n.br;vt(t,"x")&&(this.crosshairsShapeX=i.addShape("Line",{className:"tooltip-crosshairs-x",zIndex:0,visible:!1,attrs:O({x1:r.x,y1:0,x2:o.x,y2:0},e)})),vt(t,"y")&&(this.crosshairsShapeY=i.addShape("Line",{className:"tooltip-crosshairs-y",zIndex:0,visible:!1,attrs:O({x1:0,y1:o.y,x2:0,y2:r.y},e)}))},e}();function Yr(t){var e=t.getAttr("color");if(e){var i=e.getScale(e.type);if(i.isLinear)return i}var n=t.getXScale(),r=t.getYScale();return r||n}function zr(t,e){var i,n,r=t._getGroupScales();if(r.length&&h(r,(function(t){return n=t,!1})),n){var o=n.field;i=n.getText(e[o])}else{var s=Yr(t);i=s.alias||s.field}return i}function Nr(t,e){var i=Yr(t);return i.getText(e[i.field])}function Hr(t,e){var i=t.getAttr("position").getFields()[0],n=t.get("scales")[i];return n.getText(e[n.field])}function Lr(t){var e=[];return h(t,(function(t){var i=function(t,e){var i=-1;return h(t,(function(t,n){if(t.title===e.title&&t.name===e.name&&t.value===e.value&&t.color===e.color)return i=n,!1})),i}(e,t);-1===i?e.push(t):e[i]=t})),e}wt.tooltip=A({triggerOn:"press",triggerOff:"pressend",alwaysShow:!1,showTitle:!1,showCrosshairs:!1,crosshairsStyle:{stroke:"rgba(0, 0, 0, 0.25)",lineWidth:1},showTooltipMarker:!0,background:{radius:1,fill:"rgba(0, 0, 0, 0.65)",padding:[3,5]},titleStyle:{fontSize:12,fill:"#fff",textAlign:"start",textBaseline:"top"},nameStyle:{fontSize:12,fill:"rgba(255, 255, 255, 0.65)",textAlign:"start",textBaseline:"middle"},valueStyle:{fontSize:12,fill:"#fff",textAlign:"start",textBaseline:"middle"},showItemMarker:!0,itemMarkerStyle:{radius:3,symbol:"circle",lineWidth:1,stroke:"#fff"},layout:"horizontal",snap:!1},wt.tooltip||{});var Xr=function(){function t(t){var e=this;kt(this,"handleShowEvent",(function(t){var i=e.chart;if(e.enable){var n=i.get("plotRange"),r=pt(t,i);if(Ln(r,n)||e._tooltipCfg.alwaysShow){var o=e.timeStamp,s=+new Date;s-o>16&&(e.showTooltip(r),e.timeStamp=s)}else e.hideTooltip()}})),kt(this,"handleHideEvent",(function(){e.enable&&e.hideTooltip()})),this.enable=!0,this.cfg={},this.tooltip=null,this.chart=null,this.timeStamp=0,O(this,t);var i=this.chart.get("canvas");this.canvas=i,this.canvasDom=i.get("el")}var e=t.prototype;return e._setCrosshairsCfg=function(){var t=this.chart,e=O({},wt.tooltip),i=t.get("geoms"),n=[];h(i,(function(t){var e=t.get("type");-1===n.indexOf(e)&&n.push(e)}));var r=t.get("coord").type;return!i.length||"cartesian"!==r&&"rect"!==r||1===n.length&&-1!==["line","area","path","point"].indexOf(n[0])&&O(e,{showCrosshairs:!0}),e},e._getMaxLength=function(t){void 0===t&&(t={});var e=t,i=e.layout,n=e.plotRange;return"horizontal"===i?n.br.x-n.bl.x:n.bl.y-n.tr.y},e.render=function(){if(!this.tooltip){var t=this.chart,e=t.get("canvas"),i=t.get("frontPlot").addGroup({className:"tooltipContainer",zIndex:10}),n=t.get("backPlot").addGroup({className:"tooltipContainer"}),r=t.get("plotRange"),o=t.get("coord"),s=this._setCrosshairsCfg(),a=this.cfg,l=A({plotRange:r,frontPlot:i,backPlot:n,canvas:e,fixed:o.transposed||o.isPolar},s,a);l.maxLength=this._getMaxLength(l),this._tooltipCfg=l;var c=new Br(l);this.tooltip=c,l.alwaysShow&&this.prePoint&&this.showTooltip(this.prePoint),this.bindEvents()}},e.clear=function(){var t=this.tooltip;t&&(t.destroy(),this.unBindEvents()),this.tooltip=null,this._lastActive=null},e._getTooltipMarkerStyle=function(t){void 0===t&&(t={});var e=t,i=e.type,n=e.items,r=this._tooltipCfg;if("rect"===i){var o,s,a,l,c=this.chart,h=c.get("plotRange"),u=h.tl,f=h.br,p=c.get("coord"),d=n[0],g=n[n.length-1],v=d.width;p.transposed?(o=u.x,s=g.y-.75*v,a=f.x-u.x,l=d.y-g.y+1.5*v):(o=d.x-.75*v,s=u.y,a=g.x-d.x+1.5*v,l=f.y-u.y),t.style=O({x:o,y:s,width:a,height:l,fill:"#CCD6EC",opacity:.3},r.tooltipMarkerStyle)}else t.style=O({radius:4,fill:"#fff",lineWidth:2},r.tooltipMarkerStyle);return t},e._setTooltip=function(t,e,i){void 0===i&&(i={}),this.prePoint=t;var n=this._lastActive,r=this.tooltip,o=this._tooltipCfg;e=Lr(e);var s=this.chart,a=s.get("coord"),l=s.getYScales()[0],c=o.snap;if(!1===c&&l.isLinear){var h,u,f=a.invertPoint(t);Ln(t,s.get("plotRange"))&&(a.transposed?(h=l.invert(f.x),u=t.x,r.setXTipContent(h),r.setXTipPosition(u),r.setYCrosshairPosition(u)):(h=l.invert(f.y),u=t.y,r.setYTipContent(h),r.setYTipPosition(u),r.setXCrosshairPosition(u)))}if(o.onShow&&o.onShow({x:t.x,y:t.y,tooltip:r,items:e,tooltipMarkerCfg:i}),p=n,d=e,JSON.stringify(p)!==JSON.stringify(d)){var p,d;this._lastActive=e;var g=o.onChange;g&&g({x:t.x,y:t.y,tooltip:r,items:e,tooltipMarkerCfg:i});var v=e[0],m=v.title||v.name,y=v.x;if(e.length>1&&(y=(e[0].x+e[e.length-1].x)/2),r.setContent(m,e,a.transposed),r.setPosition(e,t),a.transposed){var x=v.y;e.length>1&&(x=(e[0].y+e[e.length-1].y)/2),r.setYTipContent(m),r.setYTipPosition(x),r.setXCrosshairPosition(x),c&&(r.setXTipContent(v.value),r.setXTipPosition(y),r.setYCrosshairPosition(y))}else r.setXTipContent(m),r.setXTipPosition(y),r.setYCrosshairPosition(y),c&&(r.setYTipContent(v.value),r.setYTipPosition(v.y),r.setXCrosshairPosition(v.y));var b=i.items;o.showTooltipMarker&&b.length?(i=this._getTooltipMarkerStyle(i),r.setMarkers(i)):r.clearMarkers(),r.show()}else!1===c&&(vt(o.crosshairsType,"y")||o.showYTip)&&this.chart.get("canvas").draw()},e.showTooltip=function(t){var e,i,n=this.chart,r=[],o=[],s=this._tooltipCfg,a=s.showItemMarker,c=s.itemMarkerStyle,u=s.alwaysShow;a&&(i=c);var f=n.get("geoms"),p=n.get("coord");if(h(f,(function(n){if(n.get("visible")){var s=n.get("type"),a=n.getSnapRecords(t),c=n.get("adjust");if("interval"===s&&c&&"symmetric"===c.type)return;h(a,(function(t){var a=t.x,c=t.y,h=t._origin,u=t.color;if((a||!isNaN(a))&&(c||!isNaN(c))){var f={x:a,y:l(c)?c[1]:c,color:u||wt.defaultColor,origin:h,name:zr(n,h),value:Nr(n,h),title:Hr(n,h)};i&&(f.marker=O({fill:u||wt.defaultColor},i)),o.push(f),-1!==["line","area","path"].indexOf(s)?(e="circle",r.push(f)):"interval"!==s||"cartesian"!==p.type&&"rect"!==p.type||(e="rect",f.width=n.getSize(t._origin),r.push(f))}}))}})),o.length){var d={items:r,type:e};this._setTooltip(t,o,d)}else u||this.hideTooltip()},e.hideTooltip=function(){var t=this._tooltipCfg;this._lastActive=null;var e=this.tooltip;e&&(e.hide(),t.onHide&&t.onHide({tooltip:e}),this.chart.get("canvas").draw())},e._handleEvent=function(t,e,i){var n=this.canvas;h([].concat(t),(function(t){"bind"===i?n.on(t,e):n.off(t,e)}))},e.bindEvents=function(){var t=this._tooltipCfg,e=t.triggerOn,i=t.triggerOff,n=t.alwaysShow;e&&this._handleEvent(e,this.handleShowEvent,"bind"),n||this._handleEvent(i,this.handleHideEvent,"bind")},e.unBindEvents=function(){var t=this._tooltipCfg,e=t.triggerOn,i=t.triggerOff,n=t.alwaysShow;e&&this._handleEvent(e,this.handleShowEvent,"unBind"),n||this._handleEvent(i,this.handleHideEvent,"unBind")},t}();function Fr(t){var e=new Xr({chart:t});t.set("tooltipController",e),t.tooltip=function(t,i){return c(t)&&(i=t,t=!0),e.enable=t,i&&(e.cfg=i),this}}function jr(t){var e=t.get("tooltipController");e.render(),t.showTooltip=function(t){return e.showTooltip(t),this},t.hideTooltip=function(){return e.hideTooltip(),this}}function Rr(t){t.get("tooltipController").clear()}var $r={init:Fr,afterGeomDraw:jr,clearInner:Rr},Wr=Object.freeze({__proto__:null,init:Fr,afterGeomDraw:jr,clearInner:Rr,default:$r});wt.guide=A({line:{style:{stroke:"#a3a3a3",lineWidth:1},top:!0},text:{style:{fill:"#787878",textAlign:"center",textBaseline:"middle"},offsetX:0,offsetY:0,top:!0},rect:{style:{fill:"#fafafa"},top:!1},arc:{style:{stroke:"#a3a3a3"},top:!0},html:{offsetX:0,offsetY:0,alignX:"center",alignY:"middle"},tag:{top:!0,offsetX:0,offsetY:0,side:4,background:{padding:5,radius:2,fill:"#1890FF"},textStyle:{fontSize:12,fill:"#fff",textAlign:"center",textBaseline:"middle"}},point:{top:!0,offsetX:0,offsetY:0,style:{fill:"#fff",r:3,lineWidth:2,stroke:"#1890ff"}}},wt.guide||{});var Gr=function(){function t(t){this.guides=[],this.xScale=null,this.yScales=null,this.guideShapes=[],O(this,t)}var e=t.prototype;return e._toString=function(t){return s(t)&&(t=t(this.xScale,this.yScales)),t=t.toString()},e._getId=function(t,e){var i=e.id;if(!i){var n=e.type;i="arc"===n||"line"===n||"rect"===n?this._toString(e.start)+"-"+this._toString(e.end):this._toString(e.position)}return i},e.paint=function(t){var e=this,i=e.chart,n=e.guides,r=e.xScale,o=e.yScales,s=[];h(n,(function(n,a){var l;n.xScale=r,n.yScales=o,"regionFilter"===n.type?n.chart=i:l=n.top?e.frontPlot:e.backPlot,n.coord=t,n.container=l,n.canvas=i.get("canvas");var c=n.render(t,l);if(c){var h=e._getId(c,n);[].concat(c).forEach((function(t){t._id=t.get("className")+"-"+h,t.set("index",a),s.push(t)}))}})),e.guideShapes=s},e.clear=function(){return this.reset(),this.guides=[],this},e.reset=function(){h(this.guides,(function(t){t.remove()}))},e._createGuide=function(t,e){var i=T(t),n=new wr[i](A({},wt.guide[t],e));return this.guides.push(n),n},e.line=function(t){return void 0===t&&(t={}),this._createGuide("line",t)},e.text=function(t){return void 0===t&&(t={}),this._createGuide("text",t)},e.arc=function(t){return void 0===t&&(t={}),this._createGuide("arc",t)},e.html=function(t){return void 0===t&&(t={}),this._createGuide("html",t)},e.rect=function(t){return void 0===t&&(t={}),this._createGuide("rect",t)},e.tag=function(t){return void 0===t&&(t={}),this._createGuide("tag",t)},e.point=function(t){return void 0===t&&(t={}),this._createGuide("point",t)},e.regionFilter=function(t){return void 0===t&&(t={}),this._createGuide("regionFilter",t)},t}();function Vr(t){var e=new Gr({frontPlot:t.get("frontPlot").addGroup({zIndex:20,className:"guideContainer"}),backPlot:t.get("backPlot").addGroup({className:"guideContainer"})});t.set("guideController",e),t.guide=function(){return e}}function qr(t){var e=t.get("guideController");if(e.guides.length){var i=t.getXScale(),n=t.getYScales(),r=t.get("coord");e.xScale=i,e.yScales=n,e.chart=t,e.paint(r)}}function Ur(t){t.get("guideController").clear()}function Kr(t){t.get("guideController").reset()}var Zr={init:Vr,afterGeomDraw:qr,clear:Ur,repaint:Kr},Qr=Object.freeze({__proto__:null,init:Vr,afterGeomDraw:qr,clear:Ur,repaint:Kr,default:Zr}),Jr={itemMarginBottom:12,itemGap:10,showTitle:!1,titleStyle:{fontSize:12,fill:"#808080",textAlign:"start",textBaseline:"top"},nameStyle:{fill:"#808080",fontSize:12,textAlign:"start",textBaseline:"middle"},valueStyle:{fill:"#000000",fontSize:12,textAlign:"start",textBaseline:"middle"},unCheckStyle:{fill:"#bfbfbf"},itemWidth:"auto",wordSpace:6,selectedMode:"multiple"};wt.legend=A({common:Jr,right:O({position:"right",layout:"vertical"},Jr),left:O({position:"left",layout:"vertical"},Jr),top:O({position:"top",layout:"horizontal"},Jr),bottom:O({position:"bottom",layout:"horizontal"},Jr)},wt.legend||{});var to=function(){function t(t){var e=this;kt(this,"handleEvent",(function(t){var i=e,n=i.chart,r=pt(t,n),o=function(t,e){var n=null;return h(i.legends,(function(i){h(i,(function(i){var r=i.itemsGroup,o=i.legendHitBoxes,s=r.get("children");if(s.length){var a=i.x,l=i.y;h(o,(function(r,o){if(t>=r.x+a&&t<=r.x+r.width+a&&e>=r.y+l&&e<=r.height+r.y+l)return n={clickedItem:s[o],clickedLegend:i},!1}))}}))})),n}(r.x,r.y);if(o&&!1!==o.clickedLegend.clickable){var s=o.clickedItem,a=o.clickedLegend;if(a.onClick)t.clickedItem=s,a.onClick(t);else if(!a.custom){var l=s.get("checked"),c=s.get("dataValue"),u=a.filteredVals,f=a.field;"single"===a.selectedMode?n.filter(f,(function(t){return t===c})):(l?u.push(c):q(u,c),n.filter(f,(function(t){return-1===u.indexOf(t)}))),n.repaint()}}})),this.legendCfg={},this.enable=!0,this.position="top",O(this,t);var i=this.chart;this.canvasDom=i.get("canvas").get("el"),this.clear()}var e=t.prototype;return e.addLegend=function(t,e,i){var n=this.legendCfg,r=t.field,o=n[r];if(!1===o)return null;if(o&&o.custom)this.addCustomLegend(r);else{var s=n.position||this.position;o&&o.position&&(s=o.position),t.isCategory&&this._addCategoryLegend(t,e,s,i)}},e.addCustomLegend=function(t){var e=this.legendCfg;t&&e[t]&&(e=e[t]);var i=e.position||this.position,n=this.legends;n[i]=n[i]||[];var r=e.items;if(!r)return null;var o=this.container;h(r,(function(t){p(t.marker)?t.marker.radius=t.marker.radius||3:t.marker={symbol:t.marker||"circle",fill:t.fill,radius:3},t.checked=!!a(t.checked)||t.checked,t.name=t.name||t.value}));var s=new Er(A({},wt.legend[i],e,{maxLength:this._getMaxLength(i),items:r,parent:o}));n[i].push(s)},e.clear=function(){h(this.legends,(function(t){h(t,(function(t){t.clear()}))})),this.legends={},this.unBindEvents()},e._isFiltered=function(t,e,i){var n=!1;return h(e,(function(e){if(n=n||t.getText(e)===t.getText(i))return!1})),n},e._getMaxLength=function(t){var e=this.chart,i=gt(e.get("appendPadding"));return"right"===t||"left"===t?e.get("height")-(i[0]+i[2]):e.get("width")-(i[1]+i[3])},e._addCategoryLegend=function(t,e,i,n){var r=this,o=r.legendCfg,s=r.legends,a=r.container,l=r.chart,c=t.field;s[i]=s[i]||[];var u="circle";o[c]&&o[c].marker?u=o[c].marker:o.marker&&(u=o.marker),h(e,(function(e){p(u)?O(e.marker,u):e.marker.symbol=u,n&&(e.checked=!r._isFiltered(t,n,e.dataValue))})),l.get("legendItems")[c]=e;var f=A({},wt.legend[i],o[c]||o,{maxLength:r._getMaxLength(i),items:e,field:c,filteredVals:n,parent:a});f.showTitle&&A(f,{title:t.alias||t.field});var d=new Er(f);return s[i].push(d),d},e._alignLegend=function(t,e,i){var n=this.plotRange,r=n.tl,o=n.bl,s=this.chart,a=t.offsetX||0,l=t.offsetY||0,c=s.get("width"),h=s.get("height"),u=gt(s.get("appendPadding")),f=t.getHeight(),p=t.getWidth(),d=0,g=0;if("left"===i||"right"===i){var v=t.verticalAlign||"middle",m=Math.abs(r.y-o.y);d="left"===i?u[3]:c-p-u[1],g=(m-f)/2+r.y,"top"===v?g=r.y:"bottom"===v&&(g=o.y-f),e&&(g=e.get("y")-f-12)}else{var y=t.align||"left";if(d=u[3],"center"===y?d=c/2-p/2:"right"===y&&(d=c-(p+u[1])),g="top"===i?u[0]+Math.abs(t.container.getBBox().minY):h-f,e){var x=e.getWidth();d=e.x+x+12}}"bottom"===i&&l>0&&(l=0),"right"===i&&a>0&&(a=0),t.moveTo(d+a,g+l)},e.alignLegends=function(){var t=this;return h(t.legends,(function(e,i){h(e,(function(n,r){var o=e[r-1];t._alignLegend(n,o,i)}))})),t},e.bindEvents=function(){var t=this.legendCfg.triggerOn||"touchstart";ct(this.canvasDom,t,this.handleEvent)},e.unBindEvents=function(){var t=this.legendCfg.triggerOn||"touchstart";ht(this.canvasDom,t,this.handleEvent)},t}();function eo(t){var e=new to({container:t.get("backPlot").addGroup(),plotRange:t.get("plotRange"),chart:t});t.set("legendController",e),t.legend=function(t,i){var n=e.legendCfg;return e.enable=!0,M(t)?(e.enable=t,n=i||{}):c(t)?n=t:n[t]=i,e.legendCfg=n,this}}function io(t){var e=t.get("legendController");if(!e.enable)return null;var i=e.legendCfg,n=e.container;if(i&&i.custom)e.addCustomLegend();else{var r=t.getLegendItems(),o=t.get("scales"),s=t.get("filters");h(r,(function(t,i){var n,r=o[i],a=r.values;n=s&&s[i]?a.filter((function(t){return!s[i](t)})):[],e.addLegend(r,t,n)}))}i&&!1!==i.clickable&&e.bindEvents();var a=e.legends,l={top:0,right:0,bottom:0,left:0};h(a,(function(e,i){var n=0;h(e,(function(t){var e=t.getWidth(),r=t.getHeight();"top"===i||"bottom"===i?(n=Math.max(n,r),t.offsetY>0&&(n+=t.offsetY)):(n=Math.max(n,e),t.offsetX>0&&(n+=t.offsetX))})),l[i]=n+function(t,e){var i=0;switch(e=gt(e),t){case"top":i=e[0];break;case"right":i=e[1];break;case"bottom":i=e[2];break;case"left":i=e[3]}return i}(i,t.get("appendPadding"))})),t.set("legendRange",l),Object.keys(a).length?n.set("ariaLabel",St.legend.prefix):n.set("ariaLabel",null)}function no(t){t.get("legendController").alignLegends()}function ro(t){t.get("legendController").clear(),t.set("legendRange",null)}var oo={init:eo,beforeGeomDraw:io,afterGeomDraw:no,clearInner:ro},so=Object.freeze({__proto__:null,init:eo,beforeGeomDraw:io,afterGeomDraw:no,clearInner:ro,default:oo}),ao="object"==typeof performance&&performance.now?performance:Date,lo=function(){function t(){this.anims=[],this.time=null,this.playing=!1,this.canvas=[]}var e=t.prototype;return e.play=function(){var t=this;t.time=ao.now(),t.playing=!0,En((function e(){t.playing&&(En(e),t.update())}))},e.stop=function(){this.playing=!1,this.time=null,this.canvas=[]},e.pushAnim=function(t){this.playing||this.play();var e=t.delay,i=t.duration,n=this.time+e,r=n+i;t.startTime=n,t.endTime=r,this.anims.push(t)},e.update=function(){var t=ao.now();if(this.canvas=[],this.anims.length){for(var e=0;e<this.anims.length;e++){var i=this.anims[e];if(!(t<i.startTime||i.hasEnded)){var n=i.shape;if(n.get("destroyed"))this.anims.splice(e,1),e--;else{var r=i.startState,o=i.endState,s=i.interpolate,a=i.duration;t>=i.startTime&&!i.hasStarted&&(i.hasStarted=!0,i.onStart&&i.onStart());var l=(t-i.startTime)/a;if(l=Math.max(0,Math.min(l,1)),l=i.easing(l),i.onFrame)i.onFrame(l);else for(var c in s){var h=(0,s[c])(l),u=void 0;if("points"===c){u=[];for(var f=Math.max(r.points.length,o.points.length),p=0;p<f;p+=2)u.push({x:h[p],y:h[p+1]})}else u=h;n._attrs.attrs[c]=u,n._attrs.bbox=null}var d=n.get("canvas");-1===this.canvas.indexOf(d)&&this.canvas.push(d),i.onUpdate&&i.onUpdate(l),t>=i.endTime&&!i.hasEnded&&(i.hasEnded=!0,i.onEnd&&i.onEnd()),1===l&&(this.anims.splice(e,1),e--)}}}this.canvas.map((function(t){return t.draw(),t})),this.time=ao.now()}else this.stop()},t}();function co(t){return t}function ho(t){return 1-uo(1-t)}function uo(t){return(t/=1)<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}var fo=Object.freeze({__proto__:null,linear:co,quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=n/(2*Math.PI)*Math.asin(1/i),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:ho,bounceOut:uo,bounceInOut:function(t){return t<.5?.5*ho(2*t):.5*uo(2*t-1)+.5}});function po(t){for(var e=[],i=0,n=t.length;i<n;i++)t[i]&&(e.push(t[i].x),e.push(t[i].y));return e}function go(t,e){return e-=t=+t,function(i){return t+e*i}}function vo(t,e){var i,n=e?e.length:0,r=t?Math.min(n,t.length):0,o=new Array(r),s=new Array(n);for(i=0;i<r;++i)o[i]=go(t[i],e[i]);for(;i<n;++i)s[i]=e[i];return function(t){for(i=0;i<r;++i)s[i]=o[i](t);return s}}var mo=function(){function t(t,e,i){this.hasStarted=!1,this.hasEnded=!1,this.shape=t,this.source=e,this.timeline=i,this.animate=null}var e=t.prototype;return e.to=function(t){void 0===t&&(t={});var e,i=t.delay||0,n=t.attrs||{},r=t.duration||1e3;e="function"==typeof t.easing?t.easing:fo[t.easing]||co;var o={shape:this.shape,delay:i,duration:r,easing:e},s={};for(var a in n){var l=this.source[a],c=n[a];"points"===a?(l=po(l),c=po(c),s.points=vo(l,c),this.source.points=l,n.points=c):"matrix"===a?s.matrix=vo(l,c):s[a]=go(l,c)}return o.interpolate=s,o.startState=this.source,o.endState=n,this.timeline.pushAnim(o),this.animate=o,this},e.onFrame=function(t){return this.animate&&(this.animate.onFrame=function(e){t(e)}),this},e.onStart=function(t){return this.animate&&(this.animate.onStart=function(){t()}),this},e.onUpdate=function(t){return this.animate&&(this.animate.onUpdate=function(e){t(e)}),this},e.onEnd=function(t){return this.animate&&(this.animate.onEnd=function(){t()}),this},t}(),yo={appear:{duration:450,easing:"quadraticOut"},update:{duration:300,easing:"quadraticOut"},enter:{duration:300,easing:"quadraticOut"},leave:{duration:350,easing:"quadraticIn"}},xo={defaultCfg:{},Action:{},getAnimation:function(t,e,i){var n=this.defaultCfg[t];if(n){var r=n[i];if(s(r))return r(e)}return!1},getAnimateCfg:function(t,e){var i=yo[e],n=this.defaultCfg[t];return n&&n.cfg&&n.cfg[e]?A({},i,n.cfg[e]):i},registerAnimation:function(t,e){var i;this.Action||(this.Action={}),this.Action=Ct({},this.Action,((i={})[t]=e,i))}};function bo(t,e,i){var n;t.apply(e);var r=e[0],o=e[1];if("x"===i){t.transform([["t",r,o],["s",.01,1],["t",-r,-o]]);var s=t.getMatrix();n=Ot.transform(s,[["t",r,o],["s",100,1],["t",-r,-o]])}else if("y"===i){t.transform([["t",r,o],["s",1,.01],["t",-r,-o]]);var a=t.getMatrix();n=Ot.transform(a,[["t",r,o],["s",1,100],["t",-r,-o]])}else if("xy"===i){t.transform([["t",r,o],["s",.01,.01],["t",-r,-o]]);var l=t.getMatrix();n=Ot.transform(l,[["t",r,o],["s",100,100],["t",-r,-o]])}return n}function So(t,e,i,n){var r=t._id,o=function(t,e,i){var n={};return t.delay&&(n.delay=s(t.delay)?t.delay(e,i):t.delay),n.easing=t.easing,n.duration=t.duration,n.delay=t.delay,n}(i,t.get("index"),r),a=o.easing,l=o.delay,c=o.duration,h=t.animate().to({attrs:e,duration:c,delay:l,easing:a});n&&h.onEnd((function(){n()}))}function wo(t,e){var i=a(t.attr("fillOpacity"))?1:t.attr("fillOpacity"),n=a(t.attr("strokeOpacity"))?1:t.attr("strokeOpacity");t.attr("fillOpacity",0),t.attr("strokeOpacity",0),So(t,{fillOpacity:i,strokeOpacity:n},e)}var ko=Object.freeze({__proto__:null,fadeIn:wo});function Co(t,e,i,n,r){var o,s,a=function(t){var e=t.start,i=t.end;return{start:e,end:i,width:i.x-e.x,height:Math.abs(i.y-e.y)}}(i),l=a.start,c=a.end,h=a.width,u=a.height,f=new en.Rect({attrs:{x:l.x,y:c.y,width:h,height:u}});"y"===r?(o=l.x+h/2,s=n.y<l.y?n.y:l.y):"x"===r?(o=n.x>l.x?n.x:l.x,s=l.y+u/2):"xy"===r&&(i.isPolar?(o=i.center.x,s=i.center.y):(o=(l.x+c.x)/2,s=(l.y+c.y)/2));var p=bo(f,[o,s],r);f.isClip=!0,f.endState={matrix:p},f.set("canvas",t.get("canvas")),t.attr("clip",f),So(f,f.endState,e,(function(){t.attr("clip",null),f.remove(!0)}))}function To(t,e,i){for(var n=t.get("children"),r=0,o=n.length;r<o;r++){var s=n[r],a=s.getBBox();So(s,{matrix:bo(s,[(a.minX+a.maxX)/2,(a.minY+a.maxY)/2],i)},e)}}function Po(t,e,i,n){Co(t,e,i,n,"x")}function Mo(t,e,i,n){Co(t,e,i,n,"y")}function _o(t,e,i,n){Co(t,e,i,n,"xy")}function Io(t,e){To(t,e,"xy")}function Do(t,e,i){var n=Hn(i);n.set("canvas",t.get("canvas")),t.attr("clip",n);var r={};if(i.isPolar){var o=i.startAngle,s=i.endAngle;r.endAngle=s,n.attr("endAngle",o)}else{var a=i.start,l=i.end,c=Math.abs(a.x-l.x),h=Math.abs(a.y-l.y);i.isTransposed?(n.attr("height",0),r.height=h):(n.attr("width",0),r.width=c)}So(n,r,e,(function(){t.attr("clip",null),n.remove(!0)}))}var Oo,Eo=Object.freeze({__proto__:null,groupWaveIn:Do,groupScaleInX:Po,groupScaleInY:Mo,groupScaleInXY:_o,shapesScaleInX:function(t,e){To(t,e,"x")},shapesScaleInY:function(t,e){To(t,e,"y")},shapesScaleInXY:Io});tn.prototype.animate=function(){var t=O({},this.get("attrs"));return new mo(this,t,Oo)},jn.prototype.animate=function(t){return this.set("animate",t),this},xo.Action=ko,xo.defaultCfg={interval:{enter:function(t){return t.isPolar&&t.transposed?function(t){t.set("zIndex",-1),t.get("parent").sort()}:wo}},area:{enter:function(t){return t.isPolar?null:wo}},line:{enter:function(t){return t.isPolar?null:wo}},path:{enter:function(t){return t.isPolar?null:wo}}};var Ao={line:function(t){return t.isPolar?_o:Do},area:function(t){return t.isPolar?_o:Do},path:function(t){return t.isPolar?_o:Do},point:function(){return Io},interval:function(t){var e;return t.isPolar?(e=_o,t.transposed&&(e=Do)):e=t.transposed?Po:Mo,e},schema:function(){return Do}};function Bo(t,e,i){var n=[];return h(t,(function(t,r){var o=t.get("container").get("children"),s=t.get("type"),l=a(t.get("animateCfg"))?Ho(s,e):t.get("animateCfg");!1!==l&&h(o,(function(e,o){e.get("className")===s&&(e._id=function(t,e,i){var n,r=t.get("type"),o="geom"+i+"-"+r,s=t.getXScale(),a=t.getYScale(),l=s.field||"x",c=a.field||"y",u=e[c];return n=s.isIdentity?s.value:e[l],o+="interval"===r||"schema"===r?"-"+n:"line"===r||"area"===r||"path"===r?"-"+r:s.isCategory?"-"+n:"-"+n+"-"+u,h(t._getGroupScales(),(function(t){var i=t.field;"identity"!==t.type&&(o+="-"+e[i])})),o}(t,e.get("origin")._origin,r),e.set("coord",i),e.set("animateCfg",l),e.set("index",o),n.push(e))})),t.set("shapes",o)})),n}function Yo(t,e,i,n){return s(n)?n:g(n)?xo.Action[n]:xo.getAnimation(t,e,i)}function zo(t,e,i){if(!1===i||c(i)&&!1===i[e])return!1;var n=xo.getAnimateCfg(t,e);return i&&i[e]?A({},n,i[e]):n}function No(t,e,i){var n,r,o=[],a=[];h(e,(function(e){var i=t[e._id];i?(e.set("cacheShape",i),o.push(e),delete t[e._id]):a.push(e)})),h(t,(function(t){var e=t.className,o=t.coord,a=t._id,l=t.attrs,c=t.index,h=t.type;if(!1===(r=zo(e,"leave",t.animateCfg)))return!0;if(n=Yo(e,o,"leave",r.animation),s(n)){var u=i.addShape(h,{attrs:l,index:c,canvas:i,className:e});u._id=a,n(u,r,o)}})),h(o,(function(t){var e=t.get("className");if(!1===(r=zo(e,"update",t.get("animateCfg"))))return!0;var i=t.get("coord"),o=t.get("cacheShape").attrs,a=function(t,e){var i={};for(var n in e)(b(t[n])&&t[n]!==e[n]||l(t[n])&&JSON.stringify(t[n])!==JSON.stringify(e[n]))&&(i[n]=e[n]);return i}(o,t._attrs.attrs);if(Object.keys(a).length)if(n=Yo(e,i,"update",r.animation),s(n))n(t,r,i);else{var c={};h(a,(function(t,e){c[e]=o[e]})),t.attr(c),t.animate().to({attrs:a,duration:r.duration,easing:r.easing,delay:r.delay}).onEnd((function(){t.set("cacheShape",null)}))}})),h(a,(function(t){var e=t.get("className"),i=t.get("coord");if(!1===(r=zo(e,"enter",t.get("animateCfg"))))return!0;if(n=Yo(e,i,"enter",r.animation),s(n))if("interval"===e&&i.isPolar&&i.transposed){var a=t.get("index"),l=o[a-1];n(t,r,l)}else n(t,r,i)}))}function Ho(t,e){if(!t)return null;var i=e.get("animate");return t.indexOf("guide-tag")>-1&&(t="guide-tag"),c(i)?i[t]:!1!==i&&null}function Lo(){(Oo=new lo).play()}function Xo(t){if(!1!==t.get("animate")){var e=t.get("isUpdate"),i=t.get("canvas"),n=t.get("coord"),r=t.get("geoms"),o=i.get("caches")||[];0===o.length&&(e=!1);var l=Bo(r,t,n),c=t.get("axisController"),u=c.frontPlot,f=c.backPlot,p=u.get("children").concat(f.get("children")),d=[];t.get("guideController")&&(d=t.get("guideController").guideShapes);var g,v,m=[];p.concat(d).forEach((function(e){var i=Ho(e.get("className"),t);e.set("coord",n),e.set("animateCfg",i),m.push(e),l.push(e)})),i.set("caches",function(t){for(var e={},i=0,n=t.length;i<n;i++){var r=t[i];if(r._id&&!r.isClip){var o=r._id;e[o]={_id:o,type:r.get("type"),attrs:O({},r._attrs.attrs),className:r.get("className"),geomType:r.get("className"),index:r.get("index"),coord:r.get("coord"),animateCfg:r.get("animateCfg")}}}return e}(l)),e?No(o,l,i):(h(r,(function(e){var i=e.get("type"),r=a(e.get("animateCfg"))?Ho(i,t):e.get("animateCfg");if(!1!==r)if(g=zo(i,"appear",r),v=Yo(i,n,"appear",g.animation),s(v))h(e.get("shapes"),(function(t){v(t,g,n)}));else if(Ao[i]){v=Eo[g.animation]||Ao[i](n);var o=e.getYScale(),l=n.convertPoint({x:0,y:o.scale(e.getYMinValue())}),c=e.get("container");v&&v(c,g,n,l)}})),h(m,(function(t){var e=t.get("animateCfg"),i=t.get("className");if(e&&e.appear){var r=xo.getAnimateCfg(i,"appear"),o=A({},r,e.appear),a=Yo(i,n,"appear",o.animation);s(a)&&a(t,o,n)}})))}}function Fo(){Oo.stop()}var jo={afterCanvasInit:Lo,beforeCanvasDraw:Xo,afterCanvasDestroyed:Fo},Ro=Object.freeze({__proto__:null,afterCanvasInit:Lo,beforeCanvasDraw:Xo,afterCanvasDestroyed:Fo,default:jo});jn._Interactions={},jn.registerInteraction=function(t,e){jn._Interactions[t]=e},jn.getInteraction=function(t){return jn._Interactions[t]},jn.prototype.interaction=function(t,e){var i=this._interactions||{};i[t]&&i[t].destroy();var n=new(jn.getInteraction(t))(e,this);return i[t]=n,this._interactions=i,this},jn.prototype.clearInteraction=function(t){var e=this._interactions;if(e)return t?(e[t]&&e[t].destroy(),delete e[t]):h(e,(function(t,i){t.destroy(),delete e[i]})),this};var $o=[0,1],Wo=function(){function t(t){var e=this;kt(this,"chart",null),kt(this,"values",null),kt(this,"range",$o),kt(this,"startRange",$o),kt(this,"minCount",10),kt(this,"_afterinit",(function(){var t=e.getPinchScale(),i=[].concat(t.values);e.values=i,e.minScale||(e.minScale=e.minCount/i.length),e.range!==$o&&(e.updateRange(e.range),e.updateTicks())})),kt(this,"_afterdatachange",(function(){e.updateRange(e.range)})),this.chart=t,this._initEvent(t)}var e=t.prototype;return e._initEvent=function(t){t.on("afterinit",this._afterinit),t.on("afterdatachange",this._afterdatachange)},e.getPinchScale=function(){return this.chart.getXScale()},e.getFollowScale=function(){return(this.chart.getYScales()||[])[0]},e.start=function(){var t=this.range,e=this.getPinchScale(),i=t[0],n=t[1];this.startRange=[i,n],this.lastTickCount=e.tickCount},e.doZoom=function(t,e,i){var n=this.startRange,r=this.minScale,o=n[0],s=n[1],a=(s-o)*(1-i),l=a*t,c=a*e,h=Math.max(0,o-l),u=Math.min(1,s+c),f=[h,u];u-h<r||this.updateRange(f)},e.doMove=function(t){if(t){var e,i=this.startRange,n=i[0],r=i[1],o=r-n,s=o*t,a=n-s,l=r-s;e=a<0?[0,o]:l>1?[1-o,1]:[a,l],this.updateRange(e)}},e.updateRange=function(t){var e=this.values,i=t[0],n=t[1];i=Math.max(0,i),n=Math.min(1,n),this.range=[i,n];var r=e.length,o=i*r,s=n*r,a=e.slice(o,s);this.repaint(a)},e.repaint=function(t){var e=this.chart,i=this.getPinchScale(),n=i.values,r=i.ticks;(function(t,e){if(t.length!==e.length)return!1;var i=t.length-1;return t[0]===e[0]&&t[i]===e[i]})(n,t)||(this.updateScale(i,{ticks:r,values:t}),this.updateFollowScale(i,t),e.repaint())},e.updateFollowScale=function(t,e){var i=this.chart,n=this.getFollowScale(),r=t.field,o=t.type,s=n.field,a=[],l={};e.forEach((function(t){l[t]=!0})),i.get("data").forEach((function(t){if("timeCat"===o){var e=mt(t[r]);l[e]&&a.push(t[s])}}));var c=U(a),h=c.min,u=c.max;this.updateScale(n,{min:h,max:u,nice:!0})},e.updateScale=function(t,e){t&&t.change(e)},e.updateTicks=function(){var t=this.chart,e=this.values,i=this.getPinchScale(),n=i.values,r=i.tickCount,o=Math.round(r*e.length/n.length),s=oe("cat")({tickCount:o,values:e});this.updateScale(i,{ticks:s,values:n}),t.repaint()},e.destroy=function(){var t=this.chart;t.off("afterinit",this._afterinit),t.off("afterdatachange",this._afterdatachange)},t}(),Go=function(){var t=e.prototype;function e(t,e){var i=this;kt(this,"type",""),kt(this,"startEvent","touchstart"),kt(this,"processEvent","touchmove"),kt(this,"endEvent","touchend"),kt(this,"resetEvent",null),kt(this,"context",null),kt(this,"_start",(function(t){i.preStart&&i.preStart(t),i.start(t),i.onStart&&i.onStart(t)})),kt(this,"_process",(function(t){i.preProcess&&i.preProcess(t),i.process(t),i.onProcess&&i.onProcess(t)})),kt(this,"_end",(function(t){i.preEnd&&i.preEnd(t),i.end(t),i.onEnd&&i.onEnd(t)})),kt(this,"_reset",(function(t){i.preReset&&i.preReset(t),i.reset(t),i.onReset&&i.onReset(t)})),O(this,this.getDefaultCfg(),t),this.context=this.getInteractionContext(e),this.chart=e;var n=this.range;n&&(this.context.range=n),this._bindEvents(e)}return t.getDefaultCfg=function(){return{}},t.getInteractionContext=function(t){var e=t.get("interactionContext");return e||(e=new Wo(t),t.set("interactionContext",e),e)},t._bindEvents=function(t){var e=this.startEvent,i=this.processEvent,n=this.endEvent,r=this.resetEvent,o=t.get("canvas");o.on(e,this._start),o.on(i,this._process),o.on(n,this._end),o.on(r,this._reset)},t._clearEvents=function(){var t=this.chart,e=this.startEvent,i=this.processEvent,n=this.endEvent,r=this.resetEvent,o=t.get("canvas");o.off(e,this._start),o.off(i,this._process),o.off(n,this._end),o.off(r,this._start)},t.start=function(){},t.process=function(){},t.end=function(){},t.reset=function(){},t.destroy=function(){this.context.destroy(),this._clearEvents()},e}(),Vo=function(t){function e(){return t.apply(this,arguments)||this}Tt(e,t);var i=e.prototype;return i.getDefaultCfg=function(){return{type:"pan",startEvent:"panstart",processEvent:"pan",endEvent:"panend"}},i.start=function(){this.context.start()},i.process=function(t){var e=t.direction,i=t.deltaX;if("up"!==e&&"down"!==e){t.preventDefault&&t.preventDefault();var n=this.context,r=n.chart.get("coord"),o=r.start,s=i/(r.end.x-o.x);n.doMove(s)}},e}(Go),qo=function(t){Tt(i,t);var e=i.prototype;function i(e,i){var n;return O(Mt(n=t.call(this,e,i)||this).context,e),n}return e.getDefaultCfg=function(){return{type:"pinch",startEvent:"pinchstart",processEvent:"pinch",endEvent:"pinchend"}},e.start=function(){this.context.start()},e.process=function(t){t.preventDefault&&t.preventDefault();var e=t.zoom,i=t.center,n=this.context,r=n.chart.get("coord"),o=r.start,s=r.end,a=s.x-o.x,l=Math.abs(i.x-o.x)/a,c=Math.abs(s.x-i.x)/a;n.doZoom(l,c,e)},e.end=function(){this.context.updateTicks()},i}(Go);jn.registerInteraction("pan",Vo),jn.registerInteraction("pinch",qo);var Uo={Marker:en.Marker,Tooltip:Br};jn.plugins.register([Wr,so,Qr,Ro]);var Ko={Component:Uo,Global:wt,Chart:jn,Shape:qt,G:Nn,Util:yt,Helper:Xn,track:Rn,Animate:xo};e.Animate=xo,e.Chart=jn,e.Component=Uo,e.G=Nn,e.Global=wt,e.Helper=Xn,e.Shape=qt,e.Util=yt,e.default=Ko,e.track=Rn,Object.defineProperty(e,"__esModule",{value:!0})})(e)}).call(this,i(69))},function(t,e,i){var n=i(8);t.exports=function(t){if(Array.isArray(t))return n(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var n,r,o=[],s=!0,a=!1;try{for(i=i.call(t);!(s=(n=i.next()).done)&&(o.push(n.value),!e||o.length!==e);s=!0);}catch(t){a=!0,r=t}finally{try{s||null==i.return||i.return()}finally{if(a)throw r}}return o}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){function i(e,n){return t.exports=i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,i(e,n)}t.exports=i,t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){t.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}},t.exports.default=t.exports,t.exports.__esModule=!0},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,e,i){"use strict";i.r(e);var n=i(0),r=i.n(n),o=i(56),s=i(57),a=i(5),l=i.n(a),c=i(7),h=i.n(c),u=i(3),f=i.n(u);f.a.config.lang="zn-CH";var p={};function d(t,e){"object"===l()(t)&&(e=t,t=f.a.config.lang),f.a.config.lang=t,h()(p,e)}var g=i(4),v=i.n(g),m=i(1),y=i.n(m),x=i(2),b=i.n(x);function S(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(!t)return;if("string"==typeof t)return w(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return w(t,e)}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function w(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var k=function(){function t(){y()(this,t)}return b()(t,null,[{key:"WithInstall",value:function(t,e){if("object"!==l()(t)&&!t.name)throw new Error("could not install,because it is not a vue component!");t.install=function(i){i.component(t.name,t),e&&(i.prototype["$".concat(t.name.replace("mx-",""))]=e)}}},{key:"SortChildren",value:function(t,e){var i=e.$vnode.componentOptions;if(i&&i.children&&i.children.length){var n=this.FlattenVNode(i.children);return t.sort((function(t,e){return n.indexOf(t.$vnode)-n.indexOf(e.$vnode)})),t}}},{key:"FlattenVNode",value:function(t){return this.TraverseVNode(t)}},{key:"TraverseVNode",value:function(t){var e,i=[],n=S(t);try{for(n.s();!(e=n.n()).done;){var r=e.value;i.push(r),r.componentInstance&&i.push.apply(i,v()(this.TraverseVNode(r.componentInstance.$children.map((function(t){return t.$vnode}))))),r.children&&i.push.apply(i,v()(this.TraverseVNode(r.children)))}}catch(t){n.e(t)}finally{n.f()}return i}},{key:"InvokeComponent",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=[],n=function(){var e=t((function(){n.$destroy(),document.body.removeChild(n.$el),i=i.filter((function(t){return t!==n}))})),n=new f.a(e),r=document.createElement("div");return document.body.appendChild(r),n.$mount(r),n},r=function(){return i.length&&!e||i.push(n()),i[i.length-1]};return function(t){r().open(t)}}}]),t}(),C=function(){function t(e){y()(this,t),this._name=e}return b()(t,[{key:"name",get:function(){return"".concat(t.ROOT,"-").concat(this._name)}},{key:"derive",value:function(t,e){return t&&"string"!=typeof t&&(e=t,t=""),t=t?this.sub(t):this.name,"".concat(t).concat(this.mod(t,e))}},{key:"sub",value:function(t){var e=Array.isArray(t)?t:[t];return e.reduce((function(t,e){return"".concat(t,"-").concat(e)}),e.length?this.name:"")}},{key:"mod",value:function(t,e){var i=this;return e?"string"==typeof e?" ".concat(t,"--").concat(e):Array.isArray(e)?e.reduce((function(e,n){return e+i.mod(t,n)}),""):Object.keys(e).reduce((function(n,r){return n+(e[r]?i.mod(t,r):"")}),""):""}}],[{key:"Create",value:function(e){return new t(e)}}]),t}();r()(C,"ROOT","mx");var T=i(6),P=i.n(T);function M(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(!t)return;if("string"==typeof t)return _(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _(t,e)}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var I=function(){function t(e,i){y()(this,t),this._channels=e,this._alpha=i}return b()(t,[{key:"r",get:function(){return this._channels[0]}},{key:"g",get:function(){return this._channels[1]}},{key:"b",get:function(){return this._channels[2]}},{key:"a",get:function(){return this._alpha}},{key:"luminosity",get:function(){var t,e=[],i=M(this._channels.entries());try{for(i.s();!(t=i.n()).done;){var n=P()(t.value,2),r=n[0],o=n[1]/255;e[r]=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4)}}catch(t){i.e(t)}finally{i.f()}return.2126*e[0]+.7152*e[1]+.0722*e[2]}},{key:"isDark",get:function(){return this.luminosity<.5}},{key:"isLight",get:function(){return!this.isDark}},{key:"isNone",get:function(){return!this._channels||!this._channels.length}},{key:"toString",value:function(){return this.isNone?"":Number.isNaN(this._alpha)?"rgb(".concat(this._channels.map((function(t){return Math.round(t)})).join(","),")"):"rgba(".concat([this._channels,this._alpha].map((function(t){return Math.round(t)})).join(","),")")}}],[{key:"FromHex",value:function(e){if(!e.startsWith("#"))return new t(null,NaN);var i=e.length>5?function(e){for(var i=e.match(t.REG_HEX),n=[0,0,0],r=i[1],o=0;o<3;o++)n[o]=parseInt(r.slice(2*o,2*o+2),16);return{channels:n,alpha:i[2]?parseFloat(i[2],16)/255:NaN}}(e):function(e){for(var i=e.match(t.REG_HEX_ABBR)[1],n=[0,0,0],r=0;r<3;r++)n[r]=parseInt(i[r]+i[r],16);return{channels:n,alpha:i[4]?parseFloat(i[4],16)/255:NaN}}(e);return new t(i.channels,i.alpha)}},{key:"Mix",value:function(e,i,n){var r=void 0===n?.5:n,o=2*r-1,s=(e.a||1)-(i.a||1),a=((o*s==-1?o:(o+s)/(1+o*s))+1)/2,l=1-a;return new t([a*e.r+l*i.r,a*e.g+l*i.g,a*e.b+l*i.b],e.a*r+i.a*(1-r))}},{key:"Shift",value:function(e,i){return i>0?t.Shade(e,i):t.Tint(e,-i)}},{key:"Tint",value:function(e,i){return t.Mix(t.WHITE,e,i)}},{key:"Shade",value:function(e,i){return t.Mix(t.BLACK,e,i)}}]),t}();r()(I,"WHITE",new I([255,255,255],1)),r()(I,"BLACK",new I([0,0,0],1)),r()(I,"REG_HEX",/^#([a-f0-9]{6})([a-f0-9]{2})?$/i),r()(I,"REG_HEX_ABBR",/^#([a-f0-9]{3,4})$/i);var D=C.Create("badge"),O={name:D.name,props:{tag:{type:String,default:"div"},theme:{type:String,default:"red"},dot:{type:Boolean,default:!1},max:{type:Number},content:{type:Number|String},color:{type:String},offset:{type:Array},small:{type:Boolean,default:!1}},computed:{cls:function(){return D.derive([this.theme,{dot:this.dot,fixed:!!this.$slots.default,small:this.small}])},wrapperCls:function(){return D.derive("wrapper")},style:function(){var t={};if(this.color){t.backgroundColor=this.color;var e=I.FromHex(this.color);t.color=e.isDark?I.WHITE:I.BLACK}if(this.offset){var i=P()(this.offset,2),n=i[0],r=i[1];this.$slots.default?(t.top="".concat(r,"px"),t.right="".concat(-n,"px")):(t.marginLeft="".concat(n,"px"),t.marginTop="".concat(r,"px"))}return t},hasContent:function(){return this.$slots.content||!!this.content}},render:function(){var t=this,e=arguments[0],i=function(){if(!t.dot){if(t.$slots.content)return t.$slots.content;var e=t.$props,i=e.max,n=e.content;return i&&!Number.isNaN(Number(n))&&n>i?"".concat(i,"+"):t.content}},n=function(){if(t.hasContent||t.dot)return e("div",{class:t.cls,style:t.style},[i()])};if(this.$slots.default){var r=this.tag;return e(r,{class:this.wrapperCls},[this.$slots.default,n()])}return n()}},E=C.Create("icon"),A={name:E.name,components:{Badge:O},props:{tag:{type:String,default:"i"},dot:{type:Boolean,default:!1},badge:{type:String|Number},name:{type:String,required:!0},size:{type:Number|String},color:{type:String},round:{type:Boolean,default:!1},classPrefix:{type:String,default:"mx-icon"},theme:{type:String},offset:{type:Array}},computed:{imgCls:function(){return E.derive("img")},isImgIcon:function(){return this.name.includes("/")},style:function(){var t={};return this.color&&(t[this.isImgIcon?"backgroundColor":"color"]=this.color),this.size&&(t.fontSize="".concat(this.size,"px")),this.round&&(t.borderRadius="50%"),t}},methods:{onClick:function(t){this.$emit("click",t)}},render:function(){var t=this,e=arguments[0],i=this.$props,n=i.tag,r=i.dot,o=i.badge,s=i.name,a=i.classPrefix,l=function(){return e(n,{class:[a,t.isImgIcon?"":"".concat(a,"-").concat(s),t.isImgIcon&&"mx-icon--img",t.theme&&"mx-icon--".concat(t.theme)],style:t.style,on:{click:t.onClick}},[t.isImgIcon&&e("img",{class:t.imgCls,attrs:{src:s}})])};return r||o?e(O,{attrs:{dot:r,content:o,offset:this.offset,small:!0}},[l()]):l()}};i(10);k.WithInstall(A);var B=A,Y=function(){function t(){y()(this,t)}return b()(t,null,[{key:"IsWindow",value:function(t){return t===window}},{key:"IsElement",value:function(t){return(null==t?void 0:t.nodeType)===Node.ELEMENT_NODE}},{key:"IsHidden",value:function(t){if(t)return!1;var e=widnow.getComputedStyle(t),i="none"===e.getPropertyValue("display"),n=null===t.offsetParent&&"fixed"!==e.getPropertyValue("position");return i||n}},{key:"GetScrollTop",value:function(t){return Math.max("scrollTop"in t?t.scrollTop:t.scrollY,0)}},{key:"GetBoundingClientRect",value:function(t){return null!=t&&t.getBoundingClientRect?t.getBoundingClientRect():this.IsWindow(t)?new DOMRect(0,0,t.innerWidth,t.innerHeight):new DOMRect(0,0,0,0)}},{key:"GetScrollParent",value:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window,i=t;i&&i!==e&&this.IsElement(i);){var n=window.getComputedStyle(i).getPropertyValue("overflow-y");if(/scroll|auto/i.test(n)&&i.scrollHeight>i.offsetHeight)return i;i=i.parentNode}return e}},{key:"stopPropagation",value:function(t){null==t||t.stopPropagation()}},{key:"PreventDefault",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];("boolean"!=typeof(null==t?void 0:t.cancelable)||null!=t&&t.cancelable)&&t.preventDefault(),e&&t.stopPropagation()}},{key:"AddEventListener",value:function(t,e,i,n){t&&t instanceof EventTarget&&t.addEventListener(e,i,n)}},{key:"RemoveEventListener",value:function(t,e,i){t&&t instanceof EventTarget&&t.removeEventListener(e,i)}}]),t}(),z=C.Create("switch"),N={name:z.name,props:{theme:{type:String,default:"brand"},value:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},color:{type:String,default:""}},model:{prop:"value",event:"change"},computed:{cls:function(){return z.derive([this.theme,{disabled:this.disabled,active:this.value}])},style:function(){var t={};return this.value&&this.color&&(t.backgroundColor=this.color,t.borderColor=this.color),t},circleCls:function(){return z.derive("circle",{active:this.value})}},methods:{toggle:function(t){Y.StopPropogation(t),this.disabled||this.$emit("change",!this.value)}},render:function(){var t=this,e=arguments[0];return e("div",{class:this.cls,style:this.style,on:{click:function(e){return e.stopPropagation(),t.toggle(e)}}},[e("div",{class:this.circleCls})])}};i(11);k.WithInstall(N);var H=N,L=C.Create("loading"),X={name:L.name,props:{type:{type:String,default:"circular"},size:{type:Number|String},theme:{type:String,default:"loading-gray"},color:{type:String},textColor:{type:String},textSize:{type:Number|String},vertical:{type:Boolean,default:!1}},computed:{cls:function(){return L.derive([this.theme,{vertical:this.vertical}])},spinnerCls:function(){return L.derive("spinner",[this.type])},spinnerStyle:function(){var t={};return this.color&&(t.color=this.color),this.size&&(t.width="".concat(this.size,"px"),t.height="".concat(this.size,"px")),t},textCls:function(){return L.derive("text",{vertical:this.vertical})},textStyle:function(){var t,e={};return e.color=null!==(t=this.textColor)&&void 0!==t?t:this.color,this.textSize&&(e.fontSize="".concat(this.textSize,"px")),e}},render:function(){var t=this,e=arguments[0],i=e("svg",{class:L.derive("circular"),attrs:{viewBox:"25 25 50 50"}},[e("circle",{attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})]),n=Array(8).fill(null).map((function(t,i){return e("i",{class:L.derive("line",[String(i+1)])})})),r=function(){if(t.$slots.default)return e("span",{class:t.textCls,style:t.textStyle},[t.$slots.default])};return e("div",{class:this.cls},[e("span",{class:this.spinnerCls,style:this.spinnerStyle},["circular"===this.type&&i,"spinner"===this.type&&n]),r()])}},F=C.Create("button"),j={name:F.name,components:{Icon:A,Loading:X},props:{tag:{type:String,default:"button"},type:{type:String,default:"fill"},theme:{type:String,default:"brand"},size:{type:String,default:"middle"},color:{type:String,default:""},icon:{type:String,default:""},iconPrefix:{type:String},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},round:{type:Boolean,default:!0},iconPosition:{type:String,default:"left"},loadingType:{type:String,default:"spinner"}},data:function(){return{active:!1}},computed:{cls:function(){return F.derive([this.theme,this.type,this.size,{round:this.round,disabled:this.disabled,active:this.active,loading:this.loading}])},iconCls:function(){return F.derive("icon",[this.size,this.iconPosition])},loadingCls:function(){return F.derive("loading",[this.iconPosition])},style:function(){var t={};if(this.color){var e=I.FromHex(this.color);switch(this.type){case"fill":t.color=e.isDark?I.WHITE:I.BLACK,t.backgroundColor=this.active?I.Shift(e,.1):e;break;case"weak":var i=I.Shift(e,-.85);t.color=e,t.backgroundColor=this.active?I.Shift(i,.1):i;break;case"plain":t.color=e,t.borderColor=e,this.active&&(t.backgroundColor=I.Shift(e,-.85));break;case"text":t.color=this.active?I.Shift(e,.1):e}}return t}},methods:{onClick:function(t){this.loading||this.disabled||this.$emit("click",t)},onTouchStart:function(){this.loading||this.disabled||(this.active=!0)},onTouchEnd:function(){this.loading||this.disabled||(this.active=!1)}},render:function(){var t=this,e=arguments[0],i=function(){return t.$slots.loading?t.$slots.loading:e(X,{class:t.loadingCls,attrs:{type:t.loadingType,size:18}})},n=function(){return t.loading?i():t.icon?e(A,{attrs:{name:t.icon,classPrefix:t.iconPrefix},class:t.iconCls}):void 0},r=this.$props.tag;return e(r,{class:this.cls,style:this.style,on:{click:this.onClick,touchstart:this.onTouchStart,touchend:this.onTouchEnd,touchcancel:this.onTouchEnd}},["left"===this.iconPosition&&n(),this.$slots.default,"right"===this.iconPosition&&n()])}};i(12);k.WithInstall(j);var R=j;function $(t,e,i,n,r,o,s,a){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),s?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=l):r&&(l=a?function(){r.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var h=c.render;c.render=function(t,e){return l.call(e),h(t,e)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:c}}var W=$({name:"mx-button-group",props:{shape:{type:String,default:""},type:{type:String,default:""}},data:function(){return{cls:""}},mounted:function(){this.cls="mx-button-group ".concat(this.shape," ").concat(this.type)}},(function(){var t=this.$createElement;return(this._self._c||t)("div",{class:this.cls},[this._t("default")],2)}),[],!1,null,null,null).exports;i(13);W.install=function(t){t.component(W.name,W)};var G=W,V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},q=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},U=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),K=function(t){return null==t||"function"!=typeof t&&"object"!==(void 0===t?"undefined":V(t))},Z=Object.prototype.toString,Q=function(t){var e=void 0===t?"undefined":V(t);return"undefined"===e?"undefined":null===t?"null":!0===t||!1===t||t instanceof Boolean?"boolean":"string"===e||t instanceof String?"string":"number"===e||t instanceof Number?"number":"function"===e||t instanceof Function?void 0!==t.constructor.name&&"Generator"===t.constructor.name.slice(0,9)?"generatorfunction":"function":void 0!==Array.isArray&&Array.isArray(t)?"array":t instanceof RegExp?"regexp":t instanceof Date?"date":"[object RegExp]"===(e=Z.call(t))?"regexp":"[object Date]"===e?"date":"[object Arguments]"===e?"arguments":"[object Error]"===e?"error":"[object Promise]"===e?"promise":function(t){return t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}(t)?"buffer":"[object Set]"===e?"set":"[object WeakSet]"===e?"weakset":"[object Map]"===e?"map":"[object WeakMap]"===e?"weakmap":"[object Symbol]"===e?"symbol":"[object Map Iterator]"===e?"mapiterator":"[object Set Iterator]"===e?"setiterator":"[object String Iterator]"===e?"stringiterator":"[object Array Iterator]"===e?"arrayiterator":"[object Int8Array]"===e?"int8array":"[object Uint8Array]"===e?"uint8array":"[object Uint8ClampedArray]"===e?"uint8clampedarray":"[object Int16Array]"===e?"int16array":"[object Uint16Array]"===e?"uint16array":"[object Int32Array]"===e?"int32array":"[object Uint32Array]"===e?"uint32array":"[object Float32Array]"===e?"float32array":"[object Float64Array]"===e?"float64array":"object"};
/*!
 * Vue-Lazyload.js v1.3.3
 * (c) 2019 Awe <hilongjw@gmail.com>
 * Released under the MIT License.
 */function J(t){t=t||{};var e=arguments.length,i=0;if(1===e)return t;for(;++i<e;){var n=arguments[i];K(t)&&(t=n),et(n)&&tt(t,n)}return t}function tt(t,e){for(var i in function(t,e){if(null==t)throw new TypeError("expected first argument to be an object.");if(void 0===e||"undefined"==typeof Symbol)return t;if("function"!=typeof Object.getOwnPropertySymbols)return t;for(var i=Object.prototype.propertyIsEnumerable,n=Object(t),r=arguments.length,o=0;++o<r;)for(var s=Object(arguments[o]),a=Object.getOwnPropertySymbols(s),l=0;l<a.length;l++){var c=a[l];i.call(s,c)&&(n[c]=s[c])}}(t,e),e)if("__proto__"!==i&&it(e,i)){var n=e[i];et(n)?("undefined"===Q(t[i])&&"function"===Q(n)&&(t[i]=n),t[i]=J(t[i]||{},n)):t[i]=n}return t}function et(t){return"object"===Q(t)||"function"===Q(t)}function it(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var nt=J,rt="undefined"!=typeof window,ot=function(){if(rt&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)return"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}}),!0;return!1}();var st="event",at="observer",lt=function(){if(rt)return"function"==typeof window.CustomEvent?window.CustomEvent:(t.prototype=window.Event.prototype,t);function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),i}}();function ct(t,e){if(t.length){var i=t.indexOf(e);return i>-1?t.splice(i,1):void 0}}function ht(t,e){if("IMG"===t.tagName&&t.getAttribute("data-srcset")){var i=t.getAttribute("data-srcset"),n=[],r=t.parentNode.offsetWidth*e,o=void 0,s=void 0,a=void 0;(i=i.trim().split(",")).map((function(t){t=t.trim(),-1===(o=t.lastIndexOf(" "))?(s=t,a=999998):(s=t.substr(0,o),a=parseInt(t.substr(o+1,t.length-o-2),10)),n.push([a,s])})),n.sort((function(t,e){if(t[0]<e[0])return 1;if(t[0]>e[0])return-1;if(t[0]===e[0]){if(-1!==e[1].indexOf(".webp",e[1].length-5))return 1;if(-1!==t[1].indexOf(".webp",t[1].length-5))return-1}return 0}));for(var l="",c=void 0,h=0;h<n.length;h++){l=(c=n[h])[1];var u=n[h+1];if(u&&u[0]<r){l=c[1];break}if(!u){l=c[1];break}}return l}}function ut(t,e){for(var i=void 0,n=0,r=t.length;n<r;n++)if(e(t[n])){i=t[n];break}return i}var ft=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return rt&&window.devicePixelRatio||t};function pt(){if(!rt)return!1;var t=!0,e=document;try{var i=e.createElement("object");i.type="image/webp",i.style.visibility="hidden",i.innerHTML="!",e.body.appendChild(i),t=!i.offsetWidth,e.body.removeChild(i)}catch(e){t=!1}return t}var dt=function(){if(rt){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}}(),gt={on:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];dt?t.addEventListener(e,i,{capture:n,passive:!0}):t.addEventListener(e,i,n)},off:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t.removeEventListener(e,i,n)}},vt=function(t,e,i){var n=new Image;if(!t||!t.src){var r=new Error("image src is required");return i(r)}n.src=t.src,n.onload=function(){e({naturalHeight:n.naturalHeight,naturalWidth:n.naturalWidth,src:n.src})},n.onerror=function(t){i(t)}},mt=function(t,e){return"undefined"!=typeof getComputedStyle?getComputedStyle(t,null).getPropertyValue(e):t.style[e]},yt=function(t){return mt(t,"overflow")+mt(t,"overflow-y")+mt(t,"overflow-x")};function xt(){}var bt=function(){function t(e){var i=e.max;q(this,t),this.options={max:i||100},this._caches=[]}return U(t,[{key:"has",value:function(t){return this._caches.indexOf(t)>-1}},{key:"add",value:function(t){this.has(t)||(this._caches.push(t),this._caches.length>this.options.max&&this.free())}},{key:"free",value:function(){this._caches.shift()}}]),t}(),St=function(){function t(e){var i=e.el,n=e.src,r=e.error,o=e.loading,s=e.bindType,a=e.$parent,l=e.options,c=e.elRenderer,h=e.imageCache;q(this,t),this.el=i,this.src=n,this.error=r,this.loading=o,this.bindType=s,this.attempt=0,this.naturalHeight=0,this.naturalWidth=0,this.options=l,this.rect=null,this.$parent=a,this.elRenderer=c,this._imageCache=h,this.performanceData={init:Date.now(),loadStart:0,loadEnd:0},this.filter(),this.initState(),this.render("loading",!1)}return U(t,[{key:"initState",value:function(){"dataset"in this.el?this.el.dataset.src=this.src:this.el.setAttribute("data-src",this.src),this.state={loading:!1,error:!1,loaded:!1,rendered:!1}}},{key:"record",value:function(t){this.performanceData[t]=Date.now()}},{key:"update",value:function(t){var e=t.src,i=t.loading,n=t.error,r=this.src;this.src=e,this.loading=i,this.error=n,this.filter(),r!==this.src&&(this.attempt=0,this.initState())}},{key:"getRect",value:function(){this.rect=this.el.getBoundingClientRect()}},{key:"checkInView",value:function(){return this.getRect(),this.rect.top<window.innerHeight*this.options.preLoad&&this.rect.bottom>this.options.preLoadTop&&this.rect.left<window.innerWidth*this.options.preLoad&&this.rect.right>0}},{key:"filter",value:function(){var t=this;(function(t){if(!(t instanceof Object))return[];if(Object.keys)return Object.keys(t);var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);return e})(this.options.filter).map((function(e){t.options.filter[e](t,t.options)}))}},{key:"renderLoading",value:function(t){var e=this;this.state.loading=!0,vt({src:this.loading},(function(i){e.render("loading",!1),e.state.loading=!1,t()}),(function(){t(),e.state.loading=!1,e.options.silent||console.warn("VueLazyload log: load failed with loading image("+e.loading+")")}))}},{key:"load",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xt;return this.attempt>this.options.attempt-1&&this.state.error?(this.options.silent||console.log("VueLazyload log: "+this.src+" tried too more than "+this.options.attempt+" times"),void e()):this.state.rendered&&this.state.loaded?void 0:this._imageCache.has(this.src)?(this.state.loaded=!0,this.render("loaded",!0),this.state.rendered=!0,e()):void this.renderLoading((function(){t.attempt++,t.options.adapter.beforeLoad&&t.options.adapter.beforeLoad(t,t.options),t.record("loadStart"),vt({src:t.src},(function(i){t.naturalHeight=i.naturalHeight,t.naturalWidth=i.naturalWidth,t.state.loaded=!0,t.state.error=!1,t.record("loadEnd"),t.render("loaded",!1),t.state.rendered=!0,t._imageCache.add(t.src),e()}),(function(e){!t.options.silent&&console.error(e),t.state.error=!0,t.state.loaded=!1,t.render("error",!1)}))}))}},{key:"render",value:function(t,e){this.elRenderer(this,t,e)}},{key:"performance",value:function(){var t="loading",e=0;return this.state.loaded&&(t="loaded",e=(this.performanceData.loadEnd-this.performanceData.loadStart)/1e3),this.state.error&&(t="error"),{src:this.src,state:t,time:e}}},{key:"$destroy",value:function(){this.el=null,this.src=null,this.error=null,this.loading=null,this.bindType=null,this.attempt=0}}]),t}(),wt="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",kt=["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"],Ct={rootMargin:"0px",threshold:0},Tt=function(t){return function(){function e(t){var i,n,r,o,s=t.preLoad,a=t.error,l=t.throttleWait,c=t.preLoadTop,h=t.dispatchEvent,u=t.loading,f=t.attempt,p=t.silent,d=void 0===p||p,g=t.scale,v=t.listenEvents,m=(t.hasbind,t.filter),y=t.adapter,x=t.observer,b=t.observerOptions;q(this,e),this.version="1.3.3",this.mode=st,this.ListenerQueue=[],this.TargetIndex=0,this.TargetQueue=[],this.options={silent:d,dispatchEvent:!!h,throttleWait:l||200,preLoad:s||1.3,preLoadTop:c||0,error:a||wt,loading:u||wt,attempt:f||3,scale:g||ft(g),ListenEvents:v||kt,hasbind:!1,supportWebp:pt(),filter:m||{},adapter:y||{},observer:!!x,observerOptions:b||Ct},this._initEvent(),this._imageCache=new bt({max:200}),this.lazyLoadHandler=(i=this._lazyLoadHandler.bind(this),n=this.options.throttleWait,r=null,o=0,function(){if(!r){var t=Date.now()-o,e=this,s=arguments,a=function(){o=Date.now(),r=!1,i.apply(e,s)};t>=n?a():r=setTimeout(a,n)}}),this.setMode(this.options.observer?at:st)}return U(e,[{key:"config",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};nt(this.options,t)}},{key:"performance",value:function(){var t=[];return this.ListenerQueue.map((function(e){t.push(e.performance())})),t}},{key:"addLazyBox",value:function(t){this.ListenerQueue.push(t),rt&&(this._addListenerTarget(window),this._observer&&this._observer.observe(t.el),t.$el&&t.$el.parentNode&&this._addListenerTarget(t.$el.parentNode))}},{key:"add",value:function(e,i,n){var r=this;if(function(t,e){for(var i=!1,n=0,r=t.length;n<r;n++)if(e(t[n])){i=!0;break}return i}(this.ListenerQueue,(function(t){return t.el===e})))return this.update(e,i),t.nextTick(this.lazyLoadHandler);var o=this._valueFormatter(i.value),s=o.src,a=o.loading,l=o.error;t.nextTick((function(){s=ht(e,r.options.scale)||s,r._observer&&r._observer.observe(e);var o=Object.keys(i.modifiers)[0],c=void 0;o&&(c=(c=n.context.$refs[o])?c.$el||c:document.getElementById(o)),c||(c=function(t){if(rt){if(!(t instanceof HTMLElement))return window;for(var e=t;e&&e!==document.body&&e!==document.documentElement&&e.parentNode;){if(/(scroll|auto)/.test(yt(e)))return e;e=e.parentNode}return window}}(e));var h=new St({bindType:i.arg,$parent:c,el:e,loading:a,error:l,src:s,elRenderer:r._elRenderer.bind(r),options:r.options,imageCache:r._imageCache});r.ListenerQueue.push(h),rt&&(r._addListenerTarget(window),r._addListenerTarget(c)),r.lazyLoadHandler(),t.nextTick((function(){return r.lazyLoadHandler()}))}))}},{key:"update",value:function(e,i,n){var r=this,o=this._valueFormatter(i.value),s=o.src,a=o.loading,l=o.error;s=ht(e,this.options.scale)||s;var c=ut(this.ListenerQueue,(function(t){return t.el===e}));c?c.update({src:s,loading:a,error:l}):this.add(e,i,n),this._observer&&(this._observer.unobserve(e),this._observer.observe(e)),this.lazyLoadHandler(),t.nextTick((function(){return r.lazyLoadHandler()}))}},{key:"remove",value:function(t){if(t){this._observer&&this._observer.unobserve(t);var e=ut(this.ListenerQueue,(function(e){return e.el===t}));e&&(this._removeListenerTarget(e.$parent),this._removeListenerTarget(window),ct(this.ListenerQueue,e),e.$destroy())}}},{key:"removeComponent",value:function(t){t&&(ct(this.ListenerQueue,t),this._observer&&this._observer.unobserve(t.el),t.$parent&&t.$el.parentNode&&this._removeListenerTarget(t.$el.parentNode),this._removeListenerTarget(window))}},{key:"setMode",value:function(t){var e=this;ot||t!==at||(t=st),this.mode=t,t===st?(this._observer&&(this.ListenerQueue.forEach((function(t){e._observer.unobserve(t.el)})),this._observer=null),this.TargetQueue.forEach((function(t){e._initListen(t.el,!0)}))):(this.TargetQueue.forEach((function(t){e._initListen(t.el,!1)})),this._initIntersectionObserver())}},{key:"_addListenerTarget",value:function(t){if(t){var e=ut(this.TargetQueue,(function(e){return e.el===t}));return e?e.childrenCount++:(e={el:t,id:++this.TargetIndex,childrenCount:1,listened:!0},this.mode===st&&this._initListen(e.el,!0),this.TargetQueue.push(e)),this.TargetIndex}}},{key:"_removeListenerTarget",value:function(t){var e=this;this.TargetQueue.forEach((function(i,n){i.el===t&&(i.childrenCount--,i.childrenCount||(e._initListen(i.el,!1),e.TargetQueue.splice(n,1),i=null))}))}},{key:"_initListen",value:function(t,e){var i=this;this.options.ListenEvents.forEach((function(n){return gt[e?"on":"off"](t,n,i.lazyLoadHandler)}))}},{key:"_initEvent",value:function(){var t=this;this.Event={listeners:{loading:[],loaded:[],error:[]}},this.$on=function(e,i){t.Event.listeners[e]||(t.Event.listeners[e]=[]),t.Event.listeners[e].push(i)},this.$once=function(e,i){var n=t;t.$on(e,(function t(){n.$off(e,t),i.apply(n,arguments)}))},this.$off=function(e,i){if(i)ct(t.Event.listeners[e],i);else{if(!t.Event.listeners[e])return;t.Event.listeners[e].length=0}},this.$emit=function(e,i,n){t.Event.listeners[e]&&t.Event.listeners[e].forEach((function(t){return t(i,n)}))}}},{key:"_lazyLoadHandler",value:function(){var t=this,e=[];this.ListenerQueue.forEach((function(t,i){t.el&&t.el.parentNode||e.push(t),t.checkInView()&&t.load()})),e.forEach((function(e){ct(t.ListenerQueue,e),e.$destroy()}))}},{key:"_initIntersectionObserver",value:function(){var t=this;ot&&(this._observer=new IntersectionObserver(this._observerHandler.bind(this),this.options.observerOptions),this.ListenerQueue.length&&this.ListenerQueue.forEach((function(e){t._observer.observe(e.el)})))}},{key:"_observerHandler",value:function(t,e){var i=this;t.forEach((function(t){t.isIntersecting&&i.ListenerQueue.forEach((function(e){if(e.el===t.target){if(e.state.loaded)return i._observer.unobserve(e.el);e.load()}}))}))}},{key:"_elRenderer",value:function(t,e,i){if(t.el){var n=t.el,r=t.bindType,o=void 0;switch(e){case"loading":o=t.loading;break;case"error":o=t.error;break;default:o=t.src}if(r?n.style[r]='url("'+o+'")':n.getAttribute("src")!==o&&n.setAttribute("src",o),n.setAttribute("lazy",e),this.$emit(e,t,i),this.options.adapter[e]&&this.options.adapter[e](t,this.options),this.options.dispatchEvent){var s=new lt(e,{detail:t});n.dispatchEvent(s)}}}},{key:"_valueFormatter",value:function(t){var e,i=t,n=this.options.loading,r=this.options.error;return null!==(e=t)&&"object"===(void 0===e?"undefined":V(e))&&(t.src||this.options.silent||console.error("Vue Lazyload warning: miss src with "+t),i=t.src,n=t.loading||this.options.loading,r=t.error||this.options.error),{src:i,loading:n,error:r}}}]),e}()},Pt=function(t){return{props:{tag:{type:String,default:"div"}},render:function(t){return!1===this.show?t(this.tag):t(this.tag,null,this.$slots.default)},data:function(){return{el:null,state:{loaded:!1},rect:{},show:!1}},mounted:function(){this.el=this.$el,t.addLazyBox(this),t.lazyLoadHandler()},beforeDestroy:function(){t.removeComponent(this)},methods:{getRect:function(){this.rect=this.$el.getBoundingClientRect()},checkInView:function(){return this.getRect(),rt&&this.rect.top<window.innerHeight*t.options.preLoad&&this.rect.bottom>0&&this.rect.left<window.innerWidth*t.options.preLoad&&this.rect.right>0},load:function(){this.show=!0,this.state.loaded=!0,this.$emit("show",this)},destroy:function(){return this.$destroy}}}},Mt=function(){function t(e){var i=e.lazy;q(this,t),this.lazy=i,i.lazyContainerMananger=this,this._queue=[]}return U(t,[{key:"bind",value:function(t,e,i){var n=new It({el:t,binding:e,vnode:i,lazy:this.lazy});this._queue.push(n)}},{key:"update",value:function(t,e,i){var n=ut(this._queue,(function(e){return e.el===t}));n&&n.update({el:t,binding:e,vnode:i})}},{key:"unbind",value:function(t,e,i){var n=ut(this._queue,(function(e){return e.el===t}));n&&(n.clear(),ct(this._queue,n))}}]),t}(),_t={selector:"img"},It=function(){function t(e){var i=e.el,n=e.binding,r=e.vnode,o=e.lazy;q(this,t),this.el=null,this.vnode=r,this.binding=n,this.options={},this.lazy=o,this._queue=[],this.update({el:i,binding:n})}return U(t,[{key:"update",value:function(t){var e=this,i=t.el,n=t.binding;this.el=i,this.options=nt({},_t,n.value),this.getImgs().forEach((function(t){e.lazy.add(t,nt({},e.binding,{value:{src:"dataset"in t?t.dataset.src:t.getAttribute("data-src"),error:("dataset"in t?t.dataset.error:t.getAttribute("data-error"))||e.options.error,loading:("dataset"in t?t.dataset.loading:t.getAttribute("data-loading"))||e.options.loading}}),e.vnode)}))}},{key:"getImgs",value:function(){return function(t){for(var e=t.length,i=[],n=0;n<e;n++)i.push(t[n]);return i}(this.el.querySelectorAll(this.options.selector))}},{key:"clear",value:function(){var t=this;this.getImgs().forEach((function(e){return t.lazy.remove(e)})),this.vnode=null,this.binding=null,this.lazy=null}}]),t}(),Dt=function(t){return{props:{src:[String,Object],tag:{type:String,default:"img"}},render:function(t){return t(this.tag,{attrs:{src:this.renderSrc}},this.$slots.default)},data:function(){return{el:null,options:{src:"",error:"",loading:"",attempt:t.options.attempt},state:{loaded:!1,error:!1,attempt:0},rect:{},renderSrc:""}},watch:{src:function(){this.init(),t.addLazyBox(this),t.lazyLoadHandler()}},created:function(){this.init(),this.renderSrc=this.options.loading},mounted:function(){this.el=this.$el,t.addLazyBox(this),t.lazyLoadHandler()},beforeDestroy:function(){t.removeComponent(this)},methods:{init:function(){var e=t._valueFormatter(this.src),i=e.src,n=e.loading,r=e.error;this.state.loaded=!1,this.options.src=i,this.options.error=r,this.options.loading=n,this.renderSrc=this.options.loading},getRect:function(){this.rect=this.$el.getBoundingClientRect()},checkInView:function(){return this.getRect(),rt&&this.rect.top<window.innerHeight*t.options.preLoad&&this.rect.bottom>0&&this.rect.left<window.innerWidth*t.options.preLoad&&this.rect.right>0},load:function(){var e=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xt;if(this.state.attempt>this.options.attempt-1&&this.state.error)return t.options.silent||console.log("VueLazyload log: "+this.options.src+" tried too more than "+this.options.attempt+" times"),void i();var n=this.options.src;vt({src:n},(function(t){var i=t.src;e.renderSrc=i,e.state.loaded=!0}),(function(t){e.state.attempt++,e.renderSrc=e.options.error,e.state.error=!0}))}}}},Ot={install:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=Tt(t),n=new i(e),r=new Mt({lazy:n}),o="2"===t.version.split(".")[0];t.prototype.$Lazyload=n,e.lazyComponent&&t.component("lazy-component",Pt(n)),e.lazyImage&&t.component("lazy-image",Dt(n)),o?(t.directive("lazy",{bind:n.add.bind(n),update:n.update.bind(n),componentUpdated:n.lazyLoadHandler.bind(n),unbind:n.remove.bind(n)}),t.directive("lazy-container",{bind:r.bind.bind(r),componentUpdated:r.update.bind(r),unbind:r.unbind.bind(r)})):(t.directive("lazy",{bind:n.lazyLoadHandler.bind(n),update:function(t,e){nt(this.vm.$refs,this.vm.$els),n.add(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:t,oldValue:e},{context:this.vm})},unbind:function(){n.remove(this.el)}}),t.directive("lazy-container",{update:function(t,e){r.update(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:t,oldValue:e},{context:this.vm})},unbind:function(){r.unbind(this.el)}}))}};i(14);Ot.name="vue-lazyload";var Et=Ot;function At(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}var Bt=C.Create("overlay"),Yt={name:Bt.name,props:{show:{type:Boolean,default:!1},zIndex:{type:Number,default:1030},lockScroll:{type:Boolean,default:!0},duration:{type:Number,default:.36},customStyle:{type:Object,default:function(){}}},computed:{cls:function(){return Bt.derive()},style:function(){return function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?At(Object(i),!0).forEach((function(e){r()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):At(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}({zIndex:this.zIndex,animationDuration:"".concat(this.duration,"s")},this.customStyle)}},methods:{onTouchMove:function(t){this.lockScroll&&Y.PreventDefault(t,!1)},onClick:function(t){this.$emit("click",t)}},render:function(){var t=this,e=arguments[0];return e("transition",{attrs:{name:"mx-fade"}},[this.show&&e("div",{class:this.cls,style:this.style,on:{touchMove:function(e){return e.stopPropagation(),t.onTouchMove(e)},click:function(e){return e.stopPropagation(),t.onClick(e)}}},[this.$slots.default])])}},zt=C.Create("popup"),Nt={name:zt.name,components:{Overlay:Yt},props:{show:{type:Boolean,default:!1},overlay:{type:Boolean,default:!0},zIndex:{type:Number,default:1030},lockScroll:{type:Boolean,default:!0},duration:{type:Number,default:.36},overlayStyle:{type:Object,default:function(){}},background:{type:String},round:{type:Boolean,default:!1},position:{type:String,default:"bottom"},closeOnClickOveraly:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:!1}},computed:{cls:function(){var t;return zt.derive((t={round:this.round},r()(t,this.position,this.position),r()(t,"safe-area-inset-bottom",this.safeAreaInsetBottom),t))},style:function(){var t={zIndex:this.zIndex};(this.background&&(t.background=this.background),this.duration)&&(t["center"===this.position?"animationDuration":"transitionDuration"]="".concat(this.duration,"s"));return t},transitionName:function(){return zt.derive("slide-".concat(this.position))}},methods:{onClickOverlay:function(t){this.closeOnClickOveraly&&this.close(t)},close:function(t){this.$emit("close",t)}},render:function(){var t=this,e=arguments[0],i=function(){if(t.overlay)return e(Yt,{attrs:{show:t.show,"z-index":t.zIndex,"lock-scroll":t.lockScroll,duration:t.duration,"overlay-style":t.overlayStyle},on:{click:t.onClickOverlay}})},n=function(){return e("transition",{attrs:{name:t.transitionName}},[t.show&&e("div",{class:t.cls,style:t.style},[t.$slots.default])])};return e("div",[i(),n()])}};i(15);k.WithInstall(Nt);var Ht,Lt=Nt,Xt=C.Create("tag"),Ft={name:Xt.name,props:{theme:{type:String,default:"brand"},size:{type:String,default:"middle"},round:{type:Boolean,default:!0},plain:{type:Boolean,default:!1},mark:{type:Boolean,default:!1},color:{type:String},textColor:{type:String}},computed:{cls:function(){return Xt.derive([this.theme,this.size,{round:this.round,plain:this.plain,mark:this.mark}])},style:function(){var t={};if(this.color)if(this.plain)t.borderColor=this.color,t.color=this.color;else{var e=I.FromHex(this.color);t.backgroundColor=this.color,t.color=e.isDark?I.WHITE:I.BLACK}return this.textColor&&(t.color=this.textColor),t}},render:function(){var t=arguments[0];return t("span",{class:this.cls,style:this.style},[this.$slots.default])}},jt=C.Create("cell"),Rt={name:jt.name,components:(Ht={Icon:A},r()(Ht,N.name,N),r()(Ht,"Tag",Ft),Ht),props:{value:{type:Boolean,default:!1},theme:{type:String,default:""},icon:{type:String,default:""},iconShape:{type:String,default:"square"},iconColor:{type:String,default:""},iconSize:{type:String,default:""},iconDot:{type:Boolean,default:!1},size:{type:String,default:"small"},title:{type:String|Number,required:!0},subtitle:{type:String,default:""},tags:{type:Array,default:function(){return[]}},desc:{type:String,default:""},stamp:{type:String,default:""},type:{type:String,default:"normal"},card:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},model:{prop:"value",event:"change"},data:function(){return{active:!1,bodyHeaderStyle:"",collapse:!1}},computed:{valueInner:{get:function(){return this.value},set:function(t){this.$emit("change",t)}},cls:function(){return jt.derive({disabled:this.disabled,collapse:this.collapse})},headerCls:function(){return jt.derive("header",[this.size,{active:this.active}])},headerLeftCls:function(){return jt.derive("header-left",{pdr:this.icon||this.$slots.left||this.isRadio})},iconCls:function(){return jt.derive("icon")},headerRightWrapperCls:function(){return jt.derive("header-right-wrapper")},headerRightCls:function(){return jt.derive("header-right",{stamp:this.stamp})},prefixCls:function(){return jt.derive("header-right-prefix")},middleCls:function(){return jt.derive("header-right-middle",{prefix:this.desc||this.$slots.desc})},suffixCls:function(){return jt.derive("header-right-suffix")},spliterCls:function(){return jt.derive("spliter",{card:this.card})},titleCls:function(){return jt.derive("title",{mgb:this.subtitle||this.$slots.subtitle})},titleTextCls:function(){return jt.derive("title-text")},titleTagCls:function(){return jt.derive("title-tag")},subtitleCls:function(){return jt.derive("subtitle")},descCls:function(){return jt.derive("desc",[{more:!this.icon}])},stampCls:function(){return jt.derive("stamp",{small:"large"===this.size})},linkCls:function(){return jt.derive("arrow")},collapseCls:function(){return jt.derive("collapse",{collapse:this.collapse})},bodyCls:function(){return jt.derive("body")},isSmall:function(){return"small"===this.size},isSwitch:function(){return"switch"===this.type},isLink:function(){return"link"===this.type},isCollapse:function(){return"collapse"===this.type},iconSizeDict:function(){return{small:20,middle:28,large:32,super:48}},iconSizePixel:function(){var t=this.iconSize?this.iconSize:this.size;return"small"===this.size?this.iconSizeDict.small:this.iconSizeDict[t]},isIconRound:function(){return"square"!==this.iconShape},switchTheme:function(){return this.theme||"brand"},transitionName:function(){return jt.derive("slide")}},methods:{onClick:function(){this.$emit("click")},onTouchStart:function(){this.disabled||(this.active=!0)},onTouchEnd:function(){this.disabled||(this.active=!1)},onArrowClick:function(){if(console.log("click"),"link"!==this.type&&(this.collapse=!this.collapse,!this.bodyHeaderStyle)){var t=this.$refs.hLeft.clientWidth;this.bodyHeaderStyle="width: ".concat(t,"px")}}},render:function(){var t=this,e=arguments[0],i=function(){return t.$slots.left?t.$slots.left:t.icon&&e(A,{class:t.iconCls,attrs:{theme:t.theme,name:t.icon,dot:t.iconDot,color:t.iconColor,size:t.iconSizePixel,round:t.isIconRound}})},n=function(){return e("div",{class:t.prefixCls},[e("div",{class:t.titleCls},[r()]),e("div",{class:t.subtitleCls},[s()])])},r=function(){return t.$slots.title?t.$slots.title:[e("div",{class:t.titleTextCls},[t.title]),o()]},o=function(){return t.tags.map((function(t){return e(Ft,{attrs:{theme:"gray"}},[t])}))},s=function(){return t.$slots.subtitle?t.$slots.subtitle:!t.isSmall&&t.subtitle},a=function(){return e("div",{class:t.middleCls},[t.$slots.desc||e("div",{class:t.descCls},[t.desc])])},l=function(){return e("div",{class:t.suffixCls},[t.$slots.suffix||t.stamp&&e("div",{class:t.stampCls},[t.stamp])||t.isSwitch&&e("mx-switch",{attrs:{theme:t.switchTheme},model:{value:t.valueInner,callback:function(e){t.valueInner=e}}})||t.isLink&&e(A,{attrs:{name:"arrow-right",size:10}})||t.isCollapse&&e("div",{class:t.collapseCls,on:{click:t.onArrowClick}},[e(A,{attrs:{name:"arrow-right",size:10}})])])},c=function(){return e("div",{class:t.headerCls,on:{click:t.onClick,touchstart:t.onTouchStart,touchend:t.onTouchEnd,touchcancel:t.onTouchEnd}},[e("div",{class:t.headerLeftCls,ref:"hLeft"},[i()]),e("div",{class:t.headerRightWrapperCls},[e("div",{class:t.headerRightCls},[n(),a(),l()]),e("div",{class:t.spliterCls})])])},h=function(){return e("Transition",{attrs:{name:t.transitionName}},[t.collapse&&e("div",{class:t.bodyCls},[t.$slots.body||[e("div",{style:t.bodyHeaderStyle},[t.$slots["body-header"]]),e("div",[t.$slots["body-content"]])]])])};return e("div",{class:this.cls},[c(),h()])}};i(16);k.WithInstall(Rt);var $t=Rt,Wt=C.Create("nav-bar"),Gt={name:Wt.name,components:{Icon:A},data:function(){return{offsetWidth:-1}},props:{title:{type:String|Array,required:!0},subtitle:{type:String},leftText:{type:String},leftArrow:{type:Boolean,default:!0},rightText:{type:String},more:{type:Boolean,default:!0},fixed:{type:Boolean,default:!1},zIndex:{type:Number|String,default:1030},border:{type:Boolean,default:!1},background:{type:String},iconColor:{type:String},titleColor:{type:String},subtitleColor:{type:String},safeAreaInsetTop:{type:Boolean,default:!1},returnIcon:{type:String,default:"icon_backleft"}},computed:{cls:function(){return Wt.derive({fixed:this.fixed,"safe-area-inset-top":this.safeAreaInsetTop,"border-bottom":this.border})},style:function(){var t={};return this.fixed&&(t.zIndex=this.zIndex),this.background&&(t.background=this.background),t},contentCls:function(){return Wt.derive("content")},leftCls:function(){return Wt.derive("left")},titleContainerCls:function(){return Wt.derive("title-container")},titleCls:function(){return Wt.derive("title",{small:this.subtitle||this.$slots.subtitle})},titleItemContainerCls:function(){return Wt.derive("title-item-container")},titleItemCls:function(){return Wt.derive("title-item")},lineCls:function(){return Wt.derive("title-bottom-line")},titleStyle:function(){var t={};return this.titleColor&&(t.color=this.titleColor),t},subtitleCls:function(){return Wt.derive("subtitle")},subtitleStyle:function(){var t={};return this.subtitleColor&&(t.color=this.subtitleColor),t},rightCls:function(){return Wt.derive("right")},arrowCls:function(){return Wt.derive("arrow")},textCls:function(){return Wt.derive("text")},moreCls:function(){return Wt.derive("more")},hasLeft:function(){return this.leftText||this.leftArrow||this.$slots.left},hasRight:function(){return this.rightText||this.more||this.$slots.right}},methods:{onLeftClick:function(t){this.$emit("left-click",t)},onRightClick:function(t){this.$emit("right-click",t)},onItemClick:function(t){var e=this,i=t.target,n=i.className.split("-");this.$emit("change",n[n.length-1]),this.$refs.line.style.transform="translateX(".concat(i.offsetLeft+i.offsetWidth/4,"px)"),this.title.forEach((function(t,n){var r="item-title-".concat(n);r!==i.className&&(e.$refs[r].style["font-weight"]="normal")})),i.style["font-weight"]=600}},mounted:function(){var t=this;"[object Array]"===Object.prototype.toString.call(this.title)&&(this.offsetWidth=this.$refs["item-title-0"].offsetWidth,this.$nextTick((function(){t.$refs.line.style.width=t.offsetWidth/2+"px",t.$refs["item-title-0"].style["font-weight"]=600,t.$refs.line.style.transform="translateX(".concat(t.$refs["item-title-0"].offsetLeft+t.offsetWidth/4,"px)")})))},render:function(){var t=this,e=arguments[0],i=function(){return t.$slots.left?t.$slots.left:[t.leftArrow&&e(A,{class:t.arrowCls,attrs:{name:t.returnIcon,color:t.iconColor,size:"20"}}),t.leftText&&e("span",{class:t.textCls},[t.leftText])]},n=function(){return t.$slots.right?t.$slots.right:[t.rightText&&e("span",{class:t.textCls},[t.rightText]),t.more&&e(A,{class:t.moreCls,attrs:{name:"more",color:t.iconColor,size:"20"}})]},r=function(){return t.title.map((function(i,n){return e("div",{ref:"item-title-".concat(n),on:{click:t.onItemClick},class:"item-title-".concat(n)},[i])}))},o=function(){return[t.$slots.title||"[object Array]"===Object.prototype.toString.call(t.title)&&e("div",{class:t.titleItemContainerCls},[e("div",{class:t.titleItemCls},[r()]),e("transition",[e("div",{ref:"line",class:t.lineCls})])])||e("div",{class:t.titleCls,style:t.titleStyle},[t.title]),t.$slots.subtitle||t.subtitle&&e("div",{class:t.subtitleCls,style:t.subtitleStyle},[t.subtitle])]};return e("div",{class:this.cls,style:this.style},[e("div",{class:this.contentCls},[this.hasLeft&&e("div",{class:this.leftCls,on:{click:this.onLeftClick}},[i()]),e("div",{class:this.titleContainerCls},[o()]),this.hasRight&&e("div",{class:this.rightCls,on:{click:this.onRightClick}},[n()])])])}};i(17);k.WithInstall(Gt);var Vt=Gt;i(18);k.WithInstall(Ft);var qt=Ft,Ut=C.Create("notice-bar"),Kt={name:Ut.name,components:{Icon:A},props:{text:{type:String,default:""},type:{type:String,default:"normal"},theme:{type:String,default:"yellow"},buttonText:{type:String,default:""},show:{type:Boolean,default:!0},icon:{type:String,default:"info"},scrollable:{type:Boolean,default:!1},delay:{type:Number,default:1},speed:{type:Number,default:60}},model:{prop:"show",event:"close"},computed:{cls:function(){return Ut.derive([this.theme])},leftCls:function(){return Ut.derive("left")},middleCls:function(){return Ut.derive("middle")},rightCls:function(){return Ut.derive("right")},textCls:function(){return Ut.derive("text")},btnCls:function(){return Ut.derive("btn")},isButton:function(){return"button"===this.type},isClose:function(){return"close"===this.type}},methods:{onClose:function(){this.$emit("close",!1)},onButtonClick:function(t){this.$emit("button-click",t)}},render:function(){var t=this,e=arguments[0],i=function(){return e("div",{class:t.leftCls},[t.$slots.left||e(A,{attrs:{name:t.icon,theme:t.theme,size:"16"}})])},n=function(){return e("div",{class:t.middleCls},[t.$slots.middle||e("div",{class:t.textCls},[t.text])])},r=function(){return e("div",{class:t.rightCls},[t.$slots.right||t.isButton&&e("div",{class:t.btnCls,on:{click:function(e){return e.stopPropagation(),t.onButtonClick(e)}}},[t.buttonText])||t.isClose&&e(A,{attrs:{name:"close-fill",size:"12",theme:t.theme},on:{click:t.onClose}})])};if(this.show)return e("div",{class:this.cls},[i(),n(),r()])}};i(19);k.WithInstall(Kt);var Zt=Kt;i(20);k.WithInstall(Yt);var Qt=Yt,Jt=C.Create("modal"),te={name:Jt.name,components:{Popup:Nt},props:{show:{type:Boolean,default:!1},overlay:{type:Boolean,default:!0},zIndex:{type:Number,default:1030},lockScroll:{type:Boolean,default:!1},duration:{type:Number,default:.36},overlayStyle:{type:Object,default:function(){}},round:{type:Boolean,default:!1},closeOnClickOveraly:{type:Boolean,default:!0}},computed:{cls:function(){return[Jt.derive()]}},methods:{onClose:function(){this.$emit("close")}},render:function(){var t=arguments[0];return t(Nt,{attrs:{show:this.show,overlay:this.overlay,"z-index":this.zIndex,"lock-scroll":this.lockScroll,duration:this.duration,"overlay-style":this.overlayStyle,round:this.round,position:"center"},on:{close:this.onClose,"close-on-click-overlay":this.closeOnClickOveraly}},[t("div",{class:this.cls},[this.$slots.default])])}};i(21);k.WithInstall(te);var ee=te,ie=C.Create("dialog"),ne={name:ie.name,components:{Popup:Nt},props:{show:{type:Boolean,default:!1},overlay:{type:Boolean,default:!0},zIndex:{type:Number,default:1030},lockScroll:{type:Boolean,default:!1},duration:{type:Number,default:.36},overlayStyle:{type:Object,default:function(){}},closeOnClickOveraly:{type:Boolean,default:!0},title:{type:String,default:""},content:{type:String,default:""},type:{type:String,default:"confirm"},buttons:{type:Array,default:function(){return[]}},primary:{type:String,default:""}},computed:{cls:function(){return ie.derive()},headerCls:function(){return ie.derive("header")},titleCls:function(){return ie.derive("header-title")},bodyCls:function(){return ie.derive("body")},contentCls:function(){return ie.derive("body-content")},footerCls:function(){return ie.derive("footer",[this.type])},buttonTexts:function(){var t=[];if(0===this.buttons.length)switch(this.type){case"confirm":t.push("确定");break;case"alter":t.push.apply(t,["取消","确定"]);break;case"more":t.push.apply(t,["确定","更多","取消"])}else t.push.apply(t,v()(this.buttons));return t}},methods:{emitButtonClick:function(t,e){this.$emit("button-click",{text:t,index:e},this)},resolvePrimary:function(t,e){if(this.primary&&t===this.primary)return!0;if(!this.primary)switch(this.type){case"confirm":case"more":if(0===e)return!0;break;case"alter":if(1===e)return!0}return!1},btnCls:function(t,e){return ie.derive("footer-btn",r()({primary:this.resolvePrimary(t,e)},this.type,this.type))},onClose:function(){this.$emit("close")}},render:function(){var t=this,e=arguments[0],i=function(){return e("div",{class:t.headerCls},[t.$slots.header||e("div",{class:t.titleCls},[t.title])])},n=function(){var i=[t.content&&e("div",{class:t.contentCls},[t.content]),t.$slots.default];if(t.content||t.$slots.default||t.$slots.body)return e("div",{class:t.bodyCls},[t.$slots.body||i])},r=function(){var i=t.buttonTexts.map((function(i,n){return e("div",{key:n,class:t.btnCls(i,n),on:{click:function(e){return e.stopPropagation(),t.emitButtonClick(i,n)}}},[i])}));return e("div",{class:t.footerCls},[t.$slots.footer||i])};return e(Nt,{attrs:{show:this.show,overlay:this.overlay,zIndex:this.zIndex,lockScroll:this.lockScroll,duration:this.duration,"overlay-style":this.overlayStyle,"close-on-click-overlay":this.closeOnClickOveraly,position:"center"},on:{close:this.onClose}},[e("div",{class:this.cls},[i(),n(),r()])])}};function re(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function oe(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?re(Object(i),!0).forEach((function(e){r()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):re(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var se=k.InvokeComponent((function(t){return{data:function(){return{options:{show:!1,overlay:!0,zIndex:1030,lockScroll:!1,duration:.36,closeOnClickOveraly:!0,title:"",content:"",type:"confirm",buttons:[],primary:"",onButtonClick:null}}},methods:{open:function(t){this.options=oe(oe(oe({},this.options),t),{},{show:!0})},onButtonClick:function(e){this.options.onButtonClick(e),t()}},render:function(){var e=arguments[0];return e(ne,{props:oe({},this.options),on:{close:t,"button-click":this.onButtonClick}})}}}));i(22);k.WithInstall(ne,se);var ae=ne,le=i(58),ce=i.n(le),he=C.Create("search-bar"),ue={name:he.name,components:{Icon:A},props:{value:{type:String,default:""},placeholder:{type:String,default:""},theme:{type:String,default:"gray"},round:{type:Boolean,default:!1},wrapperStyle:{type:Object|String},showPrefix:{type:Boolean,default:!1},showSuffix:{type:Boolean,default:!1}},model:{prop:"value",event:"change"},computed:{wrapperCls:function(){return he.derive("wrapper",[this.theme])},cls:function(){return he.derive([this.theme,{round:this.round}])},iconCls:function(){return he.derive("icon")},contentCls:function(){return he.derive("content")},inputCls:function(){return he.derive("content-input",[this.theme])},addonCls:function(){return he.derive("addon")},prefixCls:function(){return he.derive("prefix")},suffixCls:function(){return he.derive("suffix")},valueInner:{get:function(){return this.value},set:function(t){this.emitChange(t)}}},methods:{emitChange:function(t){this.$emit("change",t)},onClear:function(){this.emitChange("")},onReturn:function(t){this.$emit("return",t)},onCancel:function(t){this.$emit("cancel",t)},onFocus:function(t){this.$emit("focus",t)}},render:function(){var t=this,e=arguments[0],i=function(){if(t.showPrefix)return e("div",{class:t.prefixCls},[t.$slots.prefix||e(A,{class:"mx-icon-return",attrs:{name:"arrow-left",size:"16"},on:{click:t.onReturn}})])},n=function(){return e("div",{class:t.iconCls},[t.$slots.icon||e(A,{attrs:{name:"search",size:"16"}})])},r=function(){return e("div",{class:t.contentCls},[e("input",ce()([{on:{input:function(e){e.target.composing||(t.valueInner=e.target.value)},focus:t.onFocus},class:t.inputCls,attrs:{type:"text",placeholder:t.placeholder},domProps:{value:t.valueInner}},{directives:[{name:"model",value:t.valueInner,modifiers:{}}]}]))])},o=function(){return e("div",{class:t.addonCls},[t.value&&(t.$slots.addon||e(A,{attrs:{name:"close",size:"16"},on:{click:t.onClear}}))])},s=function(){if(t.showSuffix)return e("div",{class:t.suffixCls},[t.$slots.action||e("div",{class:he.derive("suffix-cancel"),on:{click:t.onCancel}},["取消"])])};return e("div",{class:this.wrapperCls,style:this.wrapperStyle},[i(),e("div",{class:this.cls},[n(),r(),o()]),s()])}};i(23);k.WithInstall(ue);var fe=ue,pe=C.Create("empty"),de={name:pe.name,props:{img:{type:String,required:!0},desc:{type:String}},computed:{cls:function(){return pe.derive()},imgCls:function(){return pe.derive("img")},descCls:function(){return pe.derive("desc")},slotCls:function(){return pe.derive("slot")}},render:function(){var t=arguments[0];return t("div",{class:this.cls},[t("img",{class:this.imgCls,attrs:{src:this.img}}),t("div",{class:this.descCls},[this.desc]),t("div",{class:this.slotCls},[this.$slots.default])])}};i(24);k.WithInstall(de);var ge=de,ve=function(t,e){return(ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};
/*!
 * better-scroll / better-scroll
 * (c) 2016-2021 ustbhuangyi
 * Released under the MIT License.
 */
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function me(t,e){function i(){this.constructor=t}ve(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var ye=function(){return(ye=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function xe(t,e,i,n){return new(i||(i=Promise))((function(r,o){function s(t){try{l(n.next(t))}catch(t){o(t)}}function a(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((n=n.apply(t,e||[])).next())}))}function be(t,e){var i,n,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{i=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function Se(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),r=0;for(e=0;e<i;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,r++)n[r]=o[s];return n}var we=[{sourceKey:"scroller.scrollBehaviorX.currentPos",key:"x"},{sourceKey:"scroller.scrollBehaviorY.currentPos",key:"y"},{sourceKey:"scroller.scrollBehaviorX.hasScroll",key:"hasHorizontalScroll"},{sourceKey:"scroller.scrollBehaviorY.hasScroll",key:"hasVerticalScroll"},{sourceKey:"scroller.scrollBehaviorX.contentSize",key:"scrollerWidth"},{sourceKey:"scroller.scrollBehaviorY.contentSize",key:"scrollerHeight"},{sourceKey:"scroller.scrollBehaviorX.maxScrollPos",key:"maxScrollX"},{sourceKey:"scroller.scrollBehaviorY.maxScrollPos",key:"maxScrollY"},{sourceKey:"scroller.scrollBehaviorX.minScrollPos",key:"minScrollX"},{sourceKey:"scroller.scrollBehaviorY.minScrollPos",key:"minScrollY"},{sourceKey:"scroller.scrollBehaviorX.movingDirection",key:"movingDirectionX"},{sourceKey:"scroller.scrollBehaviorY.movingDirection",key:"movingDirectionY"},{sourceKey:"scroller.scrollBehaviorX.direction",key:"directionX"},{sourceKey:"scroller.scrollBehaviorY.direction",key:"directionY"},{sourceKey:"scroller.actions.enabled",key:"enabled"},{sourceKey:"scroller.animater.pending",key:"pending"},{sourceKey:"scroller.animater.stop",key:"stop"},{sourceKey:"scroller.scrollTo",key:"scrollTo"},{sourceKey:"scroller.scrollBy",key:"scrollBy"},{sourceKey:"scroller.scrollToElement",key:"scrollToElement"},{sourceKey:"scroller.resetPosition",key:"resetPosition"}];function ke(t){console.error("[BScroll warn]: "+t)}function Ce(t,e){if(!t)throw new Error("[BScroll] "+e)}var Te="undefined"!=typeof window,Pe=Te&&navigator.userAgent.toLowerCase(),Me=!(!Pe||!/wechatdevtools/.test(Pe)),_e=Pe&&Pe.indexOf("android")>0,Ie=function(){if("string"==typeof Pe){var t=/os (\d\d?_\d(_\d)?)/.exec(Pe);if(!t)return!1;var e=t[1].split("_").map((function(t){return parseInt(t,10)}));return!!(13===e[0]&&e[1]>=4)}return!1}(),De=!1;if(Te){try{var Oe={};Object.defineProperty(Oe,"passive",{get:function(){De=!0}}),window.addEventListener("test-passive",(function(){}),Oe)}catch(t){}}function Ee(){return window.performance&&window.performance.now&&window.performance.timing?window.performance.now()+window.performance.timing.navigationStart:+new Date}var Ae=function(t,e){for(var i in e)t[i]=e[i];return t};function Be(t){return null==t}function Ye(t,e,i){return t<e?e:t>i?i:t}function ze(t,e){if(t.findIndex)return t.findIndex(e);var i=-1;return t.some((function(t,n,r){var o=e(t,n,r);if(o)return i=n,o})),i}var Ne=Te&&document.createElement("div").style,He=function(){if(!Te)return!1;for(var t=0,e=[{key:"standard",value:"transform"},{key:"webkit",value:"webkitTransform"},{key:"Moz",value:"MozTransform"},{key:"O",value:"OTransform"},{key:"ms",value:"msTransform"}];t<e.length;t++){var i=e[t];if(void 0!==Ne[i.value])return i.key}return!1}();function Le(t){return!1===He?t:"standard"===He?"transitionEnd"===t?"transitionend":t:He+t.charAt(0).toUpperCase()+t.substr(1)}function Xe(t){return"string"==typeof t?document.querySelector(t):t}function Fe(t,e,i,n){var r=De?{passive:!1,capture:!!n}:!!n;t.addEventListener(e,i,r)}function je(t,e,i,n){t.removeEventListener(e,i,{capture:!!n})}function Re(t){for(var e=0,i=0;t;)e-=t.offsetLeft,i-=t.offsetTop,t=t.offsetParent;return{left:e,top:i}}var $e=He&&"standard"!==He?"-"+He.toLowerCase()+"-":"",We=Le("transform"),Ge=Le("transition"),Ve=Te&&Le("perspective")in Ne,qe=Te&&("ontouchstart"in window||Me),Ue=Te&&Ge in Ne,Ke={transform:We,transition:Ge,transitionTimingFunction:Le("transitionTimingFunction"),transitionDuration:Le("transitionDuration"),transitionDelay:Le("transitionDelay"),transformOrigin:Le("transformOrigin"),transitionEnd:Le("transitionEnd"),transitionProperty:Le("transitionProperty")},Ze={touchstart:1,touchmove:1,touchend:1,touchcancel:1,mousedown:2,mousemove:2,mouseup:2};function Qe(t){if(t instanceof window.SVGElement){var e=t.getBoundingClientRect();return{top:e.top,left:e.left,width:e.width,height:e.height}}return{top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}}function Je(t,e){for(var i in e)if(e[i].test(t[i]))return!0;return!1}var ti=Je;function ei(t,e){var i;void 0===e&&(e="click"),"mouseup"===t.type?i=t:"touchend"!==t.type&&"touchcancel"!==t.type||(i=t.changedTouches[0]);var n,r={};i&&(r.screenX=i.screenX||0,r.screenY=i.screenY||0,r.clientX=i.clientX||0,r.clientY=i.clientY||0);var o={ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey};if("undefined"!=typeof MouseEvent)try{n=new MouseEvent(e,Ae(ye({bubbles:!0,cancelable:!0},o),r))}catch(t){s()}else s();function s(){(n=document.createEvent("Event")).initEvent(e,!0,!0),Ae(n,r)}n.forwardedTouchEvent=!0,n._constructed=!0,t.target.dispatchEvent(n)}function ii(t,e){return new RegExp("(^|\\s)"+e+"(\\s|$)").test(t.className)}var ni={swipe:{style:"cubic-bezier(0.23, 1, 0.32, 1)",fn:function(t){return 1+--t*t*t*t*t}},swipeBounce:{style:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",fn:function(t){return t*(2-t)}},bounce:{style:"cubic-bezier(0.165, 0.84, 0.44, 1)",fn:function(t){return 1- --t*t*t*t}}},ri=Te&&window;function oi(){}var si=Te?ri.requestAnimationFrame||ri.webkitRequestAnimationFrame||ri.mozRequestAnimationFrame||ri.oRequestAnimationFrame||function(t){return window.setTimeout(t,t.interval||1e3/60)}:oi,ai=Te?ri.cancelAnimationFrame||ri.webkitCancelAnimationFrame||ri.mozCancelAnimationFrame||ri.oCancelAnimationFrame||function(t){window.clearTimeout(t)}:oi,li=function(t){},ci={enumerable:!0,configurable:!0,get:li,set:li};var hi=function(){function t(t){this.events={},this.eventTypes={},this.registerType(t)}return t.prototype.on=function(t,e,i){return void 0===i&&(i=this),this.hasType(t),this.events[t]||(this.events[t]=[]),this.events[t].push([e,i]),this},t.prototype.once=function(t,e,i){var n=this;void 0===i&&(i=this),this.hasType(t);var r=function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];n.off(t,r);var a=e.apply(i,o);if(!0===a)return a};return r.fn=e,this.on(t,r),this},t.prototype.off=function(t,e){if(!t&&!e)return this.events={},this;if(t){if(this.hasType(t),!e)return this.events[t]=[],this;var i=this.events[t];if(!i)return this;for(var n=i.length;n--;)(i[n][0]===e||i[n][0]&&i[n][0].fn===e)&&i.splice(n,1);return this}},t.prototype.trigger=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];this.hasType(t);var n=this.events[t];if(n)for(var r,o=n.length,s=Se(n),a=0;a<o;a++){var l=s[a],c=l[0],h=l[1];if(c&&!0===(r=c.apply(h,e)))return r}},t.prototype.registerType=function(t){var e=this;t.forEach((function(t){e.eventTypes[t]=t}))},t.prototype.destroy=function(){this.events={},this.eventTypes={}},t.prototype.hasType=function(t){var e=this.eventTypes;e[t]===t||ke('EventEmitter has used unknown event type: "'+t+'", should be oneof ['+Object.keys(e).map((function(t){return JSON.stringify(t)}))+"]")},t}(),ui=function(){function t(t,e){this.wrapper=t,this.events=e,this.addDOMEvents()}return t.prototype.destroy=function(){this.removeDOMEvents(),this.events=[]},t.prototype.addDOMEvents=function(){this.handleDOMEvents(Fe)},t.prototype.removeDOMEvents=function(){this.handleDOMEvents(je)},t.prototype.handleDOMEvents=function(t){var e=this,i=this.wrapper;this.events.forEach((function(n){t(i,n.name,e,!!n.capture)}))},t.prototype.handleEvent=function(t){var e=t.type;this.events.some((function(i){return i.name===e&&(i.handler(t),!0)}))},t}(),fi=function(t){function e(){var e=t.call(this)||this;return e.startX=0,e.startY=0,e.scrollX=!1,e.scrollY=!0,e.freeScroll=!1,e.directionLockThreshold=0,e.eventPassthrough="",e.click=!1,e.dblclick=!1,e.tap="",e.bounce={top:!0,bottom:!0,left:!0,right:!0},e.bounceTime=800,e.momentum=!0,e.momentumLimitTime=300,e.momentumLimitDistance=15,e.swipeTime=2500,e.swipeBounceTime=500,e.deceleration=.0015,e.flickLimitTime=200,e.flickLimitDistance=100,e.resizePolling=60,e.probeType=0,e.stopPropagation=!1,e.preventDefault=!0,e.preventDefaultException={tagName:/^(INPUT|TEXTAREA|BUTTON|SELECT|AUDIO)$/},e.tagException={tagName:/^TEXTAREA$/},e.HWCompositing=!0,e.useTransition=!0,e.bindToWrapper=!1,e.bindToTarget=!1,e.disableMouse=qe,e.disableTouch=!qe,e.autoBlur=!0,e.autoEndDistance=5,e.outOfBoundaryDampingFactor=1/3,e.specifiedIndexAsContent=0,e.quadrant=1,e}return me(e,t),e.prototype.merge=function(t){if(!t)return this;for(var e in t)"bounce"!==e?this[e]=t[e]:this.bounce=this.resolveBounce(t[e]);return this},e.prototype.process=function(){return this.translateZ=this.HWCompositing&&Ve?" translateZ(1px)":"",this.useTransition=this.useTransition&&Ue,this.preventDefault=!this.eventPassthrough&&this.preventDefault,this.scrollX="horizontal"!==this.eventPassthrough&&this.scrollX,this.scrollY="vertical"!==this.eventPassthrough&&this.scrollY,this.freeScroll=this.freeScroll&&!this.eventPassthrough,this.scrollX=!!this.freeScroll||this.scrollX,this.scrollY=!!this.freeScroll||this.scrollY,this.directionLockThreshold=this.eventPassthrough?0:this.directionLockThreshold,this},e.prototype.resolveBounce=function(t){var e={top:!0,right:!0,bottom:!0,left:!0};return"object"==typeof t?Ae(e,t):t?e:{top:!1,right:!1,bottom:!1,left:!1}},e}((function(){})),pi=function(){function t(t,e){this.wrapper=t,this.options=e,this.hooks=new hi(["beforeStart","start","move","end","click"]),this.handleDOMEvents()}return t.prototype.handleDOMEvents=function(){var t=this.options,e=t.bindToWrapper,i=t.disableMouse,n=t.disableTouch,r=t.click,o=this.wrapper,s=e?o:window,a=[],l=[],c=!n,h=!i;r&&a.push({name:"click",handler:this.click.bind(this),capture:!0}),c&&(a.push({name:"touchstart",handler:this.start.bind(this)}),l.push({name:"touchmove",handler:this.move.bind(this)},{name:"touchend",handler:this.end.bind(this)},{name:"touchcancel",handler:this.end.bind(this)})),h&&(a.push({name:"mousedown",handler:this.start.bind(this)}),l.push({name:"mousemove",handler:this.move.bind(this)},{name:"mouseup",handler:this.end.bind(this)})),this.wrapperEventRegister=new ui(o,a),this.targetEventRegister=new ui(s,l)},t.prototype.beforeHandler=function(t,e){var i=this.options,n=i.preventDefault,r=i.stopPropagation,o=i.preventDefaultException;({start:function(){return n&&!Je(t.target,o)},end:function(){return n&&!Je(t.target,o)},move:function(){return n}})[e]()&&t.preventDefault(),r&&t.stopPropagation()},t.prototype.setInitiated=function(t){void 0===t&&(t=0),this.initiated=t},t.prototype.start=function(t){var e=Ze[t.type];if(!this.initiated||this.initiated===e)if(this.setInitiated(e),ti(t.target,this.options.tagException))this.setInitiated();else if((2!==e||0===t.button)&&!this.hooks.trigger(this.hooks.eventTypes.beforeStart,t)){this.beforeHandler(t,"start");var i=t.touches?t.touches[0]:t;this.pointX=i.pageX,this.pointY=i.pageY,this.hooks.trigger(this.hooks.eventTypes.start,t)}},t.prototype.move=function(t){if(Ze[t.type]===this.initiated){this.beforeHandler(t,"move");var e=t.touches?t.touches[0]:t,i=e.pageX-this.pointX,n=e.pageY-this.pointY;if(this.pointX=e.pageX,this.pointY=e.pageY,!this.hooks.trigger(this.hooks.eventTypes.move,{deltaX:i,deltaY:n,e:t})){var r=document.documentElement.scrollLeft||window.pageXOffset||document.body.scrollLeft,o=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop,s=this.pointX-r,a=this.pointY-o,l=this.options.autoEndDistance;(s>document.documentElement.clientWidth-l||a>document.documentElement.clientHeight-l||s<l||a<l)&&this.end(t)}}},t.prototype.end=function(t){Ze[t.type]===this.initiated&&(this.setInitiated(),this.beforeHandler(t,"end"),this.hooks.trigger(this.hooks.eventTypes.end,t))},t.prototype.click=function(t){this.hooks.trigger(this.hooks.eventTypes.click,t)},t.prototype.setContent=function(t){t!==this.wrapper&&(this.wrapper=t,this.rebindDOMEvents())},t.prototype.rebindDOMEvents=function(){this.wrapperEventRegister.destroy(),this.targetEventRegister.destroy(),this.handleDOMEvents()},t.prototype.destroy=function(){this.wrapperEventRegister.destroy(),this.targetEventRegister.destroy(),this.hooks.destroy()},t}(),di={x:["translateX","px"],y:["translateY","px"]},gi=function(){function t(t){this.setContent(t),this.hooks=new hi(["beforeTranslate","translate"])}return t.prototype.getComputedPosition=function(){var t=window.getComputedStyle(this.content,null)[Ke.transform].split(")")[0].split(", ");return{x:+(t[12]||t[4])||0,y:+(t[13]||t[5])||0}},t.prototype.translate=function(t){var e=[];Object.keys(t).forEach((function(i){if(di[i]){var n=di[i][0];if(n){var r=di[i][1],o=t[i];e.push(n+"("+o+r+")")}}})),this.hooks.trigger(this.hooks.eventTypes.beforeTranslate,e,t),this.style[Ke.transform]=e.join(" "),this.hooks.trigger(this.hooks.eventTypes.translate,t)},t.prototype.setContent=function(t){this.content!==t&&(this.content=t,this.style=t.style)},t.prototype.destroy=function(){this.hooks.destroy()},t}(),vi=function(){function t(t,e,i){this.translater=e,this.options=i,this.timer=0,this.hooks=new hi(["move","end","beforeForceStop","forceStop","callStop","time","timeFunction"]),this.setContent(t)}return t.prototype.translate=function(t){this.translater.translate(t)},t.prototype.setPending=function(t){this.pending=t},t.prototype.setForceStopped=function(t){this.forceStopped=t},t.prototype.setCallStop=function(t){this.callStopWhenPending=t},t.prototype.setContent=function(t){this.content!==t&&(this.content=t,this.style=t.style,this.stop())},t.prototype.clearTimer=function(){this.timer&&(ai(this.timer),this.timer=0)},t.prototype.destroy=function(){this.hooks.destroy(),ai(this.timer)},t}(),mi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return me(e,t),e.prototype.startProbe=function(t,e){var i=this,n=t,r=function(){var o=i.translater.getComputedPosition();(function(t,e,i,n){var r=function(t,e){var i=t-e;return i>0?-1:i<0?1:0},o=r(e.x,t.x),s=r(e.y,t.y),a=i.x-n.x,l=i.y-n.y;return o*a<=0&&s*l<=0})(t,e,o,n)&&i.hooks.trigger(i.hooks.eventTypes.move,o),i.pending||(i.callStopWhenPending?i.callStopWhenPending=!1:i.hooks.trigger(i.hooks.eventTypes.end,o)),n=o,i.pending&&(i.timer=si(r))};this.callStopWhenPending&&this.setCallStop(!1),ai(this.timer),r()},e.prototype.transitionTime=function(t){void 0===t&&(t=0),this.style[Ke.transitionDuration]=t+"ms",this.hooks.trigger(this.hooks.eventTypes.time,t)},e.prototype.transitionTimingFunction=function(t){this.style[Ke.transitionTimingFunction]=t,this.hooks.trigger(this.hooks.eventTypes.timeFunction,t)},e.prototype.transitionProperty=function(){this.style[Ke.transitionProperty]=Ke.transform},e.prototype.move=function(t,e,i,n){this.setPending(i>0),this.transitionTimingFunction(n),this.transitionProperty(),this.transitionTime(i),this.translate(e);var r=3===this.options.probeType;i&&r&&this.startProbe(t,e),i||(this._reflow=this.content.offsetHeight,r&&this.hooks.trigger(this.hooks.eventTypes.move,e),this.hooks.trigger(this.hooks.eventTypes.end,e))},e.prototype.doStop=function(){var t=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),t){this.setPending(!1),ai(this.timer);var e=this.translater.getComputedPosition(),i=e.x,n=e.y;this.transitionTime(),this.translate({x:i,y:n}),this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,{x:i,y:n})}return t},e.prototype.stop=function(){this.doStop()&&this.hooks.trigger(this.hooks.eventTypes.callStop)},e}(vi),yi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return me(e,t),e.prototype.move=function(t,e,i,n){if(!i)return this.translate(e),3===this.options.probeType&&this.hooks.trigger(this.hooks.eventTypes.move,e),void this.hooks.trigger(this.hooks.eventTypes.end,e);this.animate(t,e,i,n)},e.prototype.animate=function(t,e,i,n){var r=this,o=Ee(),s=o+i,a=3===this.options.probeType,l=function(){var c=Ee();if(c>=s)return r.translate(e),a&&r.hooks.trigger(r.hooks.eventTypes.move,e),void r.hooks.trigger(r.hooks.eventTypes.end,e);var h=n(c=(c-o)/i),u={};Object.keys(e).forEach((function(i){var n=t[i],r=e[i];u[i]=(r-n)*h+n})),r.translate(u),a&&r.hooks.trigger(r.hooks.eventTypes.move,u),r.pending&&(r.timer=si(l)),r.pending||(r.callStopWhenPending?r.callStopWhenPending=!1:r.hooks.trigger(r.hooks.eventTypes.end,e))};this.setPending(!0),this.callStopWhenPending&&this.setCallStop(!1),ai(this.timer),l()},e.prototype.doStop=function(){var t=this.pending;if(this.setForceStopped(!1),this.setCallStop(!1),t){this.setPending(!1),ai(this.timer);var e=this.translater.getComputedPosition();this.setForceStopped(!0),this.setCallStop(!0),this.hooks.trigger(this.hooks.eventTypes.forceStop,e)}return t},e.prototype.stop=function(){this.doStop()&&this.hooks.trigger(this.hooks.eventTypes.callStop)},e}(vi);var xi,bi,Si,wi,ki=function(){function t(t,e,i){this.wrapper=t,this.options=i,this.hooks=new hi(["beforeComputeBoundary","computeBoundary","momentum","end","ignoreHasScroll"]),this.refresh(e)}return t.prototype.start=function(){this.dist=0,this.setMovingDirection(0),this.setDirection(0)},t.prototype.move=function(t){return t=this.hasScroll?t:0,this.setMovingDirection(t),this.performDampingAlgorithm(t,this.options.outOfBoundaryDampingFactor)},t.prototype.setMovingDirection=function(t){this.movingDirection=t>0?-1:t<0?1:0},t.prototype.setDirection=function(t){this.direction=t>0?-1:t<0?1:0},t.prototype.performDampingAlgorithm=function(t,e){var i=this.currentPos+t;return(i>this.minScrollPos||i<this.maxScrollPos)&&(i=i>this.minScrollPos&&this.options.bounces[0]||i<this.maxScrollPos&&this.options.bounces[1]?this.currentPos+t*e:i>this.minScrollPos?this.minScrollPos:this.maxScrollPos),i},t.prototype.end=function(t){var e={duration:0},i=Math.abs(this.currentPos-this.startPos);if(this.options.momentum&&t<this.options.momentumLimitTime&&i>this.options.momentumLimitDistance){var n=-1===this.direction&&this.options.bounces[0]||1===this.direction&&this.options.bounces[1]?this.wrapperSize:0;e=this.hasScroll?this.momentum(this.currentPos,this.startPos,t,this.maxScrollPos,this.minScrollPos,n,this.options):{destination:this.currentPos,duration:0}}else this.hooks.trigger(this.hooks.eventTypes.end,e);return e},t.prototype.momentum=function(t,e,i,n,r,o,s){void 0===s&&(s=this.options);var a=t-e,l=Math.abs(a)/i,c=s.deceleration,h=s.swipeBounceTime,u=s.swipeTime,f={destination:t+l*l/c*(a<0?-1:1),duration:Math.min(u,2*l/c),rate:15};return this.hooks.trigger(this.hooks.eventTypes.momentum,f,a),f.destination<n?(f.destination=o?Math.max(n-o/4,n-o/f.rate*l):n,f.duration=h):f.destination>r&&(f.destination=o?Math.min(r+o/4,r+o/f.rate*l):r,f.duration=h),f.destination=Math.round(f.destination),f},t.prototype.updateDirection=function(){var t=this.currentPos-this.absStartPos;this.setDirection(t)},t.prototype.refresh=function(t){var e=this.options.rect,i=e.size,n=e.position,r="static"===window.getComputedStyle(this.wrapper,null).position,o=Qe(this.wrapper);this.wrapperSize=this.wrapper["width"===i?"clientWidth":"clientHeight"],this.setContent(t);var s=Qe(this.content);this.contentSize=s[i],this.relativeOffset=s[n],r&&(this.relativeOffset-=o[n]),this.computeBoundary(),this.setDirection(0)},t.prototype.setContent=function(t){t!==this.content&&(this.content=t,this.resetState())},t.prototype.resetState=function(){this.currentPos=0,this.startPos=0,this.dist=0,this.setDirection(0),this.setMovingDirection(0),this.resetStartPos()},t.prototype.computeBoundary=function(){this.hooks.trigger(this.hooks.eventTypes.beforeComputeBoundary);var t={minScrollPos:0,maxScrollPos:this.wrapperSize-this.contentSize};t.maxScrollPos<0&&(t.maxScrollPos-=this.relativeOffset,0===this.options.specifiedIndexAsContent&&(t.minScrollPos=-this.relativeOffset)),this.hooks.trigger(this.hooks.eventTypes.computeBoundary,t),this.minScrollPos=t.minScrollPos,this.maxScrollPos=t.maxScrollPos,this.hasScroll=this.options.scrollable&&this.maxScrollPos<this.minScrollPos,!this.hasScroll&&this.minScrollPos<this.maxScrollPos&&(this.maxScrollPos=this.minScrollPos,this.contentSize=this.wrapperSize)},t.prototype.updatePosition=function(t){this.currentPos=t},t.prototype.getCurrentPos=function(){return this.currentPos},t.prototype.checkInBoundary=function(){var t=this.adjustPosition(this.currentPos);return{position:t,inBoundary:t===this.getCurrentPos()}},t.prototype.adjustPosition=function(t){return this.hasScroll||this.hooks.trigger(this.hooks.eventTypes.ignoreHasScroll)?t>this.minScrollPos?t=this.minScrollPos:t<this.maxScrollPos&&(t=this.maxScrollPos):t=this.minScrollPos,t},t.prototype.updateStartPos=function(){this.startPos=this.currentPos},t.prototype.updateAbsStartPos=function(){this.absStartPos=this.currentPos},t.prototype.resetStartPos=function(){this.updateStartPos(),this.updateAbsStartPos()},t.prototype.getAbsDist=function(t){return this.dist+=t,Math.abs(this.dist)},t.prototype.destroy=function(){this.hooks.destroy()},t}(),Ci=((xi={}).yes=function(t){return!0},xi.no=function(t){return t.preventDefault(),!1},xi),Ti=((bi={}).horizontal=((Si={}).yes="horizontal",Si.no="vertical",Si),bi.vertical=((wi={}).yes="vertical",wi.no="horizontal",wi),bi),Pi=function(){function t(t,e,i){this.directionLockThreshold=t,this.freeScroll=e,this.eventPassthrough=i,this.reset()}return t.prototype.reset=function(){this.directionLocked=""},t.prototype.checkMovingDirection=function(t,e,i){return this.computeDirectionLock(t,e),this.handleEventPassthrough(i)},t.prototype.adjustDelta=function(t,e){return"horizontal"===this.directionLocked?e=0:"vertical"===this.directionLocked&&(t=0),{deltaX:t,deltaY:e}},t.prototype.computeDirectionLock=function(t,e){""!==this.directionLocked||this.freeScroll||(t>e+this.directionLockThreshold?this.directionLocked="horizontal":e>=t+this.directionLockThreshold?this.directionLocked="vertical":this.directionLocked="none")},t.prototype.handleEventPassthrough=function(t){var e=Ti[this.directionLocked];if(e){if(this.eventPassthrough===e.yes)return Ci.yes(t);if(this.eventPassthrough===e.no)return Ci.no(t)}return!1},t}(),Mi=function(){function t(t,e,i,n,r){this.hooks=new hi(["start","beforeMove","scrollStart","scroll","beforeEnd","end","scrollEnd","contentNotMoved","detectMovingDirection","coordinateTransformation"]),this.scrollBehaviorX=t,this.scrollBehaviorY=e,this.actionsHandler=i,this.animater=n,this.options=r,this.directionLockAction=new Pi(r.directionLockThreshold,r.freeScroll,r.eventPassthrough),this.enabled=!0,this.bindActionsHandler()}return t.prototype.bindActionsHandler=function(){var t=this;this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.start,(function(e){return!t.enabled||t.handleStart(e)})),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.move,(function(e){var i=e.deltaX,n=e.deltaY,r=e.e;if(!t.enabled)return!0;var o=function(t,e,i){return 2===i?[e,-t]:3===i?[-t,-e]:4===i?[-e,t]:[t,e]}(i,n,t.options.quadrant),s={deltaX:o[0],deltaY:o[1]};return t.hooks.trigger(t.hooks.eventTypes.coordinateTransformation,s),t.handleMove(s.deltaX,s.deltaY,r)})),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.end,(function(e){return!t.enabled||t.handleEnd(e)})),this.actionsHandler.hooks.on(this.actionsHandler.hooks.eventTypes.click,(function(e){t.enabled&&!e._constructed&&t.handleClick(e)}))},t.prototype.handleStart=function(t){var e=Ee();this.fingerMoved=!1,this.contentMoved=!1,this.startTime=e,this.directionLockAction.reset(),this.scrollBehaviorX.start(),this.scrollBehaviorY.start(),this.animater.doStop(),this.scrollBehaviorX.resetStartPos(),this.scrollBehaviorY.resetStartPos(),this.hooks.trigger(this.hooks.eventTypes.start,t)},t.prototype.handleMove=function(t,e,i){if(!this.hooks.trigger(this.hooks.eventTypes.beforeMove,i)){var n=this.scrollBehaviorX.getAbsDist(t),r=this.scrollBehaviorY.getAbsDist(e),o=Ee();if(this.checkMomentum(n,r,o))return!0;if(this.directionLockAction.checkMovingDirection(n,r,i))return this.actionsHandler.setInitiated(),!0;var s=this.directionLockAction.adjustDelta(t,e),a=this.scrollBehaviorX.getCurrentPos(),l=this.scrollBehaviorX.move(s.deltaX),c=this.scrollBehaviorY.getCurrentPos(),h=this.scrollBehaviorY.move(s.deltaY);if(!this.hooks.trigger(this.hooks.eventTypes.detectMovingDirection)){this.fingerMoved||(this.fingerMoved=!0);var u=l!==a||h!==c;this.contentMoved||u||this.hooks.trigger(this.hooks.eventTypes.contentNotMoved),!this.contentMoved&&u&&(this.contentMoved=!0,this.hooks.trigger(this.hooks.eventTypes.scrollStart)),this.contentMoved&&u&&(this.animater.translate({x:l,y:h}),this.dispatchScroll(o))}}},t.prototype.dispatchScroll=function(t){t-this.startTime>this.options.momentumLimitTime&&(this.startTime=t,this.scrollBehaviorX.updateStartPos(),this.scrollBehaviorY.updateStartPos(),1===this.options.probeType&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())),this.options.probeType>1&&this.hooks.trigger(this.hooks.eventTypes.scroll,this.getCurrentPos())},t.prototype.checkMomentum=function(t,e,i){return i-this.endTime>this.options.momentumLimitTime&&e<this.options.momentumLimitDistance&&t<this.options.momentumLimitDistance},t.prototype.handleEnd=function(t){if(!this.hooks.trigger(this.hooks.eventTypes.beforeEnd,t)){var e=this.getCurrentPos();if(this.scrollBehaviorX.updateDirection(),this.scrollBehaviorY.updateDirection(),this.hooks.trigger(this.hooks.eventTypes.end,t,e))return!0;e=this.ensureIntegerPos(e),this.animater.translate(e),this.endTime=Ee();var i=this.endTime-this.startTime;this.hooks.trigger(this.hooks.eventTypes.scrollEnd,e,i)}},t.prototype.ensureIntegerPos=function(t){this.ensuringInteger=!0;var e=t.x,i=t.y,n=this.scrollBehaviorX,r=n.minScrollPos,o=n.maxScrollPos,s=this.scrollBehaviorY,a=s.minScrollPos,l=s.maxScrollPos;return e=e>0?Math.ceil(e):Math.floor(e),i=i>0?Math.ceil(i):Math.floor(i),{x:e=Ye(e,o,r),y:i=Ye(i,l,a)}},t.prototype.handleClick=function(t){Je(t.target,this.options.preventDefaultException)||(t.preventDefault(),t.stopPropagation())},t.prototype.getCurrentPos=function(){return{x:this.scrollBehaviorX.getCurrentPos(),y:this.scrollBehaviorY.getCurrentPos()}},t.prototype.refresh=function(){this.endTime=0},t.prototype.destroy=function(){this.hooks.destroy()},t}();function _i(t,e,i,n){var r=["momentum","momentumLimitTime","momentumLimitDistance","deceleration","swipeBounceTime","swipeTime","outOfBoundaryDampingFactor","specifiedIndexAsContent"].reduce((function(e,i){return e[i]=t[i],e}),{});return r.scrollable=!!t[e],r.bounces=i,r.rect=n,r}function Ii(t,e,i){i.forEach((function(i){var n,r;"string"==typeof i?n=r=i:(n=i.source,r=i.target),t.on(n,(function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return e.trigger.apply(e,Se([r],t))}))}))}var Di=function(){function t(t,e,i){this.wrapper=t,this.content=e,this.resizeTimeout=0,this.hooks=new hi(["beforeStart","beforeMove","beforeScrollStart","scrollStart","scroll","beforeEnd","scrollEnd","resize","touchEnd","end","flick","scrollCancel","momentum","scrollTo","minDistanceScroll","scrollToElement","beforeRefresh"]),this.options=i;var n,r=this.options.bounce,o=r.left,s=r.right,a=r.top,l=r.bottom;this.scrollBehaviorX=new ki(t,e,_i(i,"scrollX",[o,s],{size:"width",position:"left"})),this.scrollBehaviorY=new ki(t,e,_i(i,"scrollY",[a,l],{size:"height",position:"top"})),this.translater=new gi(this.content),this.animater=function(t,e,i){var n=i.useTransition,r={};return Object.defineProperty(r,"probeType",{enumerable:!0,configurable:!1,get:function(){return i.probeType}}),n?new mi(t,e,r):new yi(t,e,r)}(this.content,this.translater,this.options),this.actionsHandler=new pi(this.options.bindToTarget?this.content:t,(n=this.options,["click","bindToWrapper","disableMouse","disableTouch","preventDefault","stopPropagation","tagException","preventDefaultException","autoEndDistance"].reduce((function(t,e){return t[e]=n[e],t}),{}))),this.actions=new Mi(this.scrollBehaviorX,this.scrollBehaviorY,this.actionsHandler,this.animater,this.options);var c=this.resize.bind(this);this.resizeRegister=new ui(window,[{name:"orientationchange",handler:c},{name:"resize",handler:c}]),this.registerTransitionEnd(),this.init()}return t.prototype.init=function(){var t=this;this.bindTranslater(),this.bindAnimater(),this.bindActions(),this.hooks.on(this.hooks.eventTypes.scrollEnd,(function(){t.togglePointerEvents(!0)}))},t.prototype.registerTransitionEnd=function(){this.transitionEndRegister=new ui(this.content,[{name:Ke.transitionEnd,handler:this.transitionEnd.bind(this)}])},t.prototype.bindTranslater=function(){var t=this,e=this.translater.hooks;e.on(e.eventTypes.beforeTranslate,(function(e){t.options.translateZ&&e.push(t.options.translateZ)})),e.on(e.eventTypes.translate,(function(e){var i=t.getCurrentPos();t.updatePositions(e),!0!==t.actions.ensuringInteger?e.x===i.x&&e.y===i.y||t.togglePointerEvents(!1):t.actions.ensuringInteger=!1}))},t.prototype.bindAnimater=function(){var t=this;this.animater.hooks.on(this.animater.hooks.eventTypes.end,(function(e){t.resetPosition(t.options.bounceTime)||(t.animater.setPending(!1),t.hooks.trigger(t.hooks.eventTypes.scrollEnd,e))})),Ii(this.animater.hooks,this.hooks,[{source:this.animater.hooks.eventTypes.move,target:this.hooks.eventTypes.scroll},{source:this.animater.hooks.eventTypes.forceStop,target:this.hooks.eventTypes.scrollEnd}])},t.prototype.bindActions=function(){var t=this,e=this.actions;Ii(e.hooks,this.hooks,[{source:e.hooks.eventTypes.start,target:this.hooks.eventTypes.beforeStart},{source:e.hooks.eventTypes.start,target:this.hooks.eventTypes.beforeScrollStart},{source:e.hooks.eventTypes.beforeMove,target:this.hooks.eventTypes.beforeMove},{source:e.hooks.eventTypes.scrollStart,target:this.hooks.eventTypes.scrollStart},{source:e.hooks.eventTypes.scroll,target:this.hooks.eventTypes.scroll},{source:e.hooks.eventTypes.beforeEnd,target:this.hooks.eventTypes.beforeEnd}]),e.hooks.on(e.hooks.eventTypes.end,(function(i,n){return t.hooks.trigger(t.hooks.eventTypes.touchEnd,n),!!t.hooks.trigger(t.hooks.eventTypes.end,n)||(!(e.fingerMoved||(t.hooks.trigger(t.hooks.eventTypes.scrollCancel),!t.checkClick(i)))||(t.resetPosition(t.options.bounceTime,ni.bounce)?(t.animater.setForceStopped(!1),!0):void 0))})),e.hooks.on(e.hooks.eventTypes.scrollEnd,(function(i,n){var r=Math.abs(i.x-t.scrollBehaviorX.startPos),o=Math.abs(i.y-t.scrollBehaviorY.startPos);if(t.checkFlick(n,r,o))return t.animater.setForceStopped(!1),void t.hooks.trigger(t.hooks.eventTypes.flick);t.momentum(i,n)?t.animater.setForceStopped(!1):(e.contentMoved&&t.hooks.trigger(t.hooks.eventTypes.scrollEnd,i),t.animater.forceStopped&&t.animater.setForceStopped(!1))}))},t.prototype.checkFlick=function(t,e,i){if(this.hooks.events.flick.length>1&&t<this.options.flickLimitTime&&e<this.options.flickLimitDistance&&i<this.options.flickLimitDistance&&(i>1||e>1))return!0},t.prototype.momentum=function(t,e){var i={time:0,easing:ni.swiper,newX:t.x,newY:t.y},n=this.scrollBehaviorX.end(e),r=this.scrollBehaviorY.end(e);if(i.newX=Be(n.destination)?i.newX:n.destination,i.newY=Be(r.destination)?i.newY:r.destination,i.time=Math.max(n.duration,r.duration),this.hooks.trigger(this.hooks.eventTypes.momentum,i,this),i.newX!==t.x||i.newY!==t.y)return(i.newX>this.scrollBehaviorX.minScrollPos||i.newX<this.scrollBehaviorX.maxScrollPos||i.newY>this.scrollBehaviorY.minScrollPos||i.newY<this.scrollBehaviorY.maxScrollPos)&&(i.easing=ni.swipeBounce),this.scrollTo(i.newX,i.newY,i.time,i.easing),!0},t.prototype.checkClick=function(t){var e=this.animater.forceStopped;if(this.hooks.trigger(this.hooks.eventTypes.checkClick))return this.animater.setForceStopped(!1),!0;if(!e){var i=this.options.dblclick,n=!1;if(i&&this.lastClickTime){var r=i.delay,o=void 0===r?300:r;Ee()-this.lastClickTime<o&&(n=!0,function(t){ei(t,"dblclick")}(t))}return this.options.tap&&function(t,e){var i=document.createEvent("Event");i.initEvent(e,!0,!0),i.pageX=t.pageX,i.pageY=t.pageY,t.target.dispatchEvent(i)}(t,this.options.tap),this.options.click&&!Je(t.target,this.options.preventDefaultException)&&ei(t),this.lastClickTime=n?null:Ee(),!0}return!1},t.prototype.resize=function(){var t=this;this.actions.enabled&&(_e&&(this.wrapper.scrollTop=0),clearTimeout(this.resizeTimeout),this.resizeTimeout=window.setTimeout((function(){t.hooks.trigger(t.hooks.eventTypes.resize)}),this.options.resizePolling))},t.prototype.transitionEnd=function(t){t.target===this.content&&this.animater.pending&&(this.animater.transitionTime(),this.resetPosition(this.options.bounceTime,ni.bounce)||(this.animater.setPending(!1),3!==this.options.probeType&&this.hooks.trigger(this.hooks.eventTypes.scrollEnd,this.getCurrentPos())))},t.prototype.togglePointerEvents=function(t){void 0===t&&(t=!0);for(var e=this.content.children.length?this.content.children:[this.content],i=t?"auto":"none",n=0;n<e.length;n++){var r=e[n];r.isBScrollContainer||(r.style.pointerEvents=i)}},t.prototype.refresh=function(t){var e=this.setContent(t);this.hooks.trigger(this.hooks.eventTypes.beforeRefresh),this.scrollBehaviorX.refresh(t),this.scrollBehaviorY.refresh(t),e&&(this.translater.setContent(t),this.animater.setContent(t),this.transitionEndRegister.destroy(),this.registerTransitionEnd(),this.options.bindToTarget&&this.actionsHandler.setContent(t)),this.actions.refresh(),this.wrapperOffset=Re(this.wrapper)},t.prototype.setContent=function(t){var e=t!==this.content;return e&&(this.content=t),e},t.prototype.scrollBy=function(t,e,i,n){void 0===i&&(i=0);var r=this.getCurrentPos(),o=r.x,s=r.y;n=n||ni.bounce,t+=o,e+=s,this.scrollTo(t,e,i,n)},t.prototype.scrollTo=function(t,e,i,n,r){void 0===i&&(i=0),void 0===n&&(n=ni.bounce),void 0===r&&(r={start:{},end:{}});var o=this.options.useTransition?n.style:n.fn,s=this.getCurrentPos(),a=ye({x:s.x,y:s.y},r.start),l=ye({x:t,y:e},r.end);if(this.hooks.trigger(this.hooks.eventTypes.scrollTo,l),!function(t,e){for(var i=0,n=Object.keys(t);i<n.length;i++){var r=n[i];if(t[r]!==e[r])return!1}return!0}(a,l)){var c=Math.abs(l.x-a.x),h=Math.abs(l.y-a.y);c<1&&h<1&&(i=0,this.hooks.trigger(this.hooks.eventTypes.minDistanceScroll)),this.animater.move(a,l,i,o)}},t.prototype.scrollToElement=function(t,e,i,n,r){var o=Xe(t),s=Re(o),a=function(t,e,i){return"number"==typeof t?t:t?Math.round(e/2-i/2):0};i=a(i,o.offsetWidth,this.wrapper.offsetWidth),n=a(n,o.offsetHeight,this.wrapper.offsetHeight);var l=function(t,e,i,n){return t-=e,t=n.adjustPosition(t-i)};s.left=l(s.left,this.wrapperOffset.left,i,this.scrollBehaviorX),s.top=l(s.top,this.wrapperOffset.top,n,this.scrollBehaviorY),this.hooks.trigger(this.hooks.eventTypes.scrollToElement,o,s)||this.scrollTo(s.left,s.top,e,r)},t.prototype.resetPosition=function(t,e){void 0===t&&(t=0),void 0===e&&(e=ni.bounce);var i=this.scrollBehaviorX.checkInBoundary(),n=i.position,r=i.inBoundary,o=this.scrollBehaviorY.checkInBoundary(),s=o.position,a=o.inBoundary;return(!r||!a)&&(Ie&&this.reflow(),this.scrollTo(n,s,t,e),!0)},t.prototype.reflow=function(){this._reflow=this.content.offsetHeight},t.prototype.updatePositions=function(t){this.scrollBehaviorX.updatePosition(t.x),this.scrollBehaviorY.updatePosition(t.y)},t.prototype.getCurrentPos=function(){return this.actions.getCurrentPos()},t.prototype.enable=function(){this.actions.enabled=!0},t.prototype.disable=function(){ai(this.animater.timer),this.actions.enabled=!1},t.prototype.destroy=function(){var t=this;["resizeRegister","transitionEndRegister","actionsHandler","actions","hooks","animater","translater","scrollBehaviorX","scrollBehaviorY"].forEach((function(e){return t[e].destroy()}))},t}(),Oi=function(t){function e(e,i){var n=t.call(this,["refresh","contentChanged","enable","disable","beforeScrollStart","scrollStart","scroll","scrollEnd","scrollCancel","touchEnd","flick","destroy"])||this,r=Xe(e);return r?(n.plugins={},n.options=(new fi).merge(i).process(),n.setContent(r).valid?(n.hooks=new hi(["refresh","enable","disable","destroy","beforeInitialScrollTo","contentChanged"]),n.init(r),n):n):(ke("Can not resolve the wrapper DOM."),n)}return me(e,t),e.use=function(t){var i=t.pluginName;return e.plugins.some((function(e){return t===e.ctor}))?e:Be(i)?(ke("Plugin Class must specify plugin's name in static property by 'pluginName' field."),e):(e.pluginsMap[i]=!0,e.plugins.push({name:i,applyOrder:t.applyOrder,ctor:t}),e)},e.prototype.setContent=function(t){var e=!1,i=!0,n=t.children[this.options.specifiedIndexAsContent];return n?(e=this.content!==n)&&(this.content=n):(ke("The wrapper need at least one child element to be content element to scroll."),i=!1),{valid:i,contentChanged:e}},e.prototype.init=function(t){var e=this;this.wrapper=t,t.isBScrollContainer=!0,this.scroller=new Di(t,this.content,this.options),this.scroller.hooks.on(this.scroller.hooks.eventTypes.resize,(function(){e.refresh()})),this.eventBubbling(),this.handleAutoBlur(),this.enable(),this.proxy(we),this.applyPlugins(),this.refreshWithoutReset(this.content);var i=this.options,n={x:i.startX,y:i.startY};this.hooks.trigger(this.hooks.eventTypes.beforeInitialScrollTo,n)||this.scroller.scrollTo(n.x,n.y)},e.prototype.applyPlugins=function(){var t=this,i=this.options;e.plugins.sort((function(t,e){var i,n=((i={}).pre=-1,i.post=1,i);return(t.applyOrder?n[t.applyOrder]:0)-(e.applyOrder?n[e.applyOrder]:0)})).forEach((function(e){var n=e.ctor;i[e.name]&&"function"==typeof n&&(t.plugins[e.name]=new n(t))}))},e.prototype.handleAutoBlur=function(){this.options.autoBlur&&this.on(this.eventTypes.beforeScrollStart,(function(){var t=document.activeElement;!t||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName||t.blur()}))},e.prototype.eventBubbling=function(){Ii(this.scroller.hooks,this,[this.eventTypes.beforeScrollStart,this.eventTypes.scrollStart,this.eventTypes.scroll,this.eventTypes.scrollEnd,this.eventTypes.scrollCancel,this.eventTypes.touchEnd,this.eventTypes.flick])},e.prototype.refreshWithoutReset=function(t){this.scroller.refresh(t),this.hooks.trigger(this.hooks.eventTypes.refresh,t),this.trigger(this.eventTypes.refresh,t)},e.prototype.proxy=function(t){var e=this;t.forEach((function(t){var i=t.key,n=t.sourceKey;!function(t,e,i){ci.get=function(){return function(t,e){for(var i=e.split("."),n=0;n<i.length-1;n++)if("object"!=typeof(t=t[i[n]])||!t)return;var r=i.pop();return"function"==typeof t[r]?function(){return t[r].apply(t,arguments)}:t[r]}(this,e)},ci.set=function(t){!function(t,e,i){for(var n,r=e.split("."),o=0;o<r.length-1;o++)t[n=r[o]]||(t[n]={}),t=t[n];t[r.pop()]=i}(this,e,t)},Object.defineProperty(t,i,ci)}(e,n,i)}))},e.prototype.refresh=function(){var t=this.setContent(this.wrapper),e=t.contentChanged;if(t.valid){var i=this.content;this.refreshWithoutReset(i),e&&(this.hooks.trigger(this.hooks.eventTypes.contentChanged,i),this.trigger(this.eventTypes.contentChanged,i)),this.scroller.resetPosition()}},e.prototype.enable=function(){this.scroller.enable(),this.hooks.trigger(this.hooks.eventTypes.enable),this.trigger(this.eventTypes.enable)},e.prototype.disable=function(){this.scroller.disable(),this.hooks.trigger(this.hooks.eventTypes.disable),this.trigger(this.eventTypes.disable)},e.prototype.destroy=function(){this.hooks.trigger(this.hooks.eventTypes.destroy),this.trigger(this.eventTypes.destroy),this.scroller.destroy()},e.prototype.eventRegister=function(t){this.registerType(t)},e.plugins=[],e.pluginsMap={},e}(hi);function Ei(t,e){return new Oi(t,e)}Ei.use=Oi.use,Ei.plugins=Oi.plugins,Ei.pluginsMap=Oi.pluginsMap;var Ai=Ei,Bi=function(){function t(t){this.scroll=t,this.wheelEndTimer=0,this.wheelMoveTimer=0,this.wheelStart=!1,this.init()}return t.prototype.init=function(){this.handleBScroll(),this.handleOptions(),this.handleHooks(),this.registerEvent()},t.prototype.handleBScroll=function(){this.scroll.registerType(["alterOptions","mousewheelStart","mousewheelMove","mousewheelEnd"])},t.prototype.handleOptions=function(){var t=!0===this.scroll.options.mouseWheel?{}:this.scroll.options.mouseWheel;this.mouseWheelOpt=Ae({speed:20,invert:!1,easeTime:300,discreteTime:400,throttleTime:0,dampingFactor:.1},t)},t.prototype.handleHooks=function(){this.hooksFn=[],this.registerHooks(this.scroll.hooks,"destroy",this.destroy)},t.prototype.registerEvent=function(){this.eventRegister=new ui(this.scroll.scroller.wrapper,[{name:"wheel",handler:this.wheelHandler.bind(this)},{name:"mousewheel",handler:this.wheelHandler.bind(this)},{name:"DOMMouseScroll",handler:this.wheelHandler.bind(this)}])},t.prototype.registerHooks=function(t,e,i){t.on(e,i,this),this.hooksFn.push([t,e,i])},t.prototype.wheelHandler=function(t){if(this.scroll.enabled){this.beforeHandler(t),this.wheelStart||(this.wheelStartHandler(t),this.wheelStart=!0);var e=this.getWheelDelta(t);this.wheelMoveHandler(e),this.wheelEndDetector(e)}},t.prototype.wheelStartHandler=function(t){this.cleanCache();var e=this.scroll.scroller,i=e.scrollBehaviorX,n=e.scrollBehaviorY;i.setMovingDirection(0),n.setMovingDirection(0),i.setDirection(0),n.setDirection(0),this.scroll.trigger(this.scroll.eventTypes.alterOptions,this.mouseWheelOpt),this.scroll.trigger(this.scroll.eventTypes.mousewheelStart)},t.prototype.cleanCache=function(){this.deltaCache=[]},t.prototype.wheelMoveHandler=function(t){var e=this,i=this.mouseWheelOpt,n=i.throttleTime,r=i.dampingFactor;if(n&&this.wheelMoveTimer)this.deltaCache.push(t);else{var o=this.deltaCache.reduce((function(t,e){return{x:t.x+e.x,y:t.y+e.y}}),{x:0,y:0});this.cleanCache();var s=this.scroll.scroller,a=s.scrollBehaviorX,l=s.scrollBehaviorY;a.setMovingDirection(-t.directionX),l.setMovingDirection(-t.directionY),a.setDirection(t.x),l.setDirection(t.y);var c=a.performDampingAlgorithm(Math.round(t.x)+o.x,r),h=l.performDampingAlgorithm(Math.round(t.y)+o.x,r);if(!this.scroll.trigger(this.scroll.eventTypes.mousewheelMove,{x:c,y:h})){var u=this.getEaseTime();c===this.scroll.x&&h===this.scroll.y||this.scroll.scrollTo(c,h,u)}n&&(this.wheelMoveTimer=window.setTimeout((function(){e.wheelMoveTimer=0}),n))}},t.prototype.wheelEndDetector=function(t){var e=this;window.clearTimeout(this.wheelEndTimer),this.wheelEndTimer=window.setTimeout((function(){e.wheelStart=!1,window.clearTimeout(e.wheelMoveTimer),e.wheelMoveTimer=0,e.scroll.trigger(e.scroll.eventTypes.mousewheelEnd,t)}),this.mouseWheelOpt.discreteTime)},t.prototype.getWheelDelta=function(t){var e=this.mouseWheelOpt,i=e.speed,n=0,r=0,o=e.invert?-1:1;switch(!0){case"deltaX"in t:1===t.deltaMode?(n=-t.deltaX*i,r=-t.deltaY*i):(n=-t.deltaX,r=-t.deltaY);break;case"wheelDeltaX"in t:n=t.wheelDeltaX/120*i,r=t.wheelDeltaY/120*i;break;case"wheelDelta"in t:n=r=t.wheelDelta/120*i;break;case"detail"in t:n=r=-t.detail/3*i}return n*=o,r*=o,this.scroll.hasVerticalScroll||(Math.abs(r)>Math.abs(n)&&(n=r),r=0),this.scroll.hasHorizontalScroll||(n=0),{x:n,y:r,directionX:n>0?-1:n<0?1:0,directionY:r>0?-1:r<0?1:0}},t.prototype.beforeHandler=function(t){var e=this.scroll.options,i=e.preventDefault,n=e.stopPropagation,r=e.preventDefaultException;i&&!Je(t.target,r)&&t.preventDefault(),n&&t.stopPropagation()},t.prototype.getEaseTime=function(){var t=this.mouseWheelOpt.easeTime;return t<100&&ke("easeTime should be greater than 100.If mouseWheel easeTime is too small,scrollEnd will be triggered many times."),Math.max(t,100)},t.prototype.destroy=function(){this.eventRegister.destroy(),window.clearTimeout(this.wheelEndTimer),window.clearTimeout(this.wheelMoveTimer),this.hooksFn.forEach((function(t){var e=t[0],i=t[1],n=t[2];e.off(i,n)}))},t.pluginName="mouseWheel",t.applyOrder="pre",t}(),Yi=function(){function t(t){this.scroll=t,this.stopObserver=!1,this.init()}return t.prototype.init=function(){this.handleMutationObserver(),this.handleHooks()},t.prototype.handleMutationObserver=function(){var t=this;if("undefined"!=typeof MutationObserver){this.observer=new MutationObserver((function(e){t.mutationObserverHandler(e,0)})),this.startObserve(this.observer)}else this.checkDOMUpdate()},t.prototype.handleHooks=function(){var t=this;this.hooksFn=[],this.registerHooks(this.scroll.hooks,this.scroll.hooks.eventTypes.contentChanged,(function(){t.stopObserve(),t.handleMutationObserver()})),this.registerHooks(this.scroll.hooks,this.scroll.hooks.eventTypes.enable,(function(){t.stopObserver&&t.handleMutationObserver()})),this.registerHooks(this.scroll.hooks,this.scroll.hooks.eventTypes.disable,(function(){t.stopObserve()})),this.registerHooks(this.scroll.hooks,this.scroll.hooks.eventTypes.destroy,(function(){t.destroy()}))},t.prototype.mutationObserverHandler=function(t,e){var i=this;if(!this.shouldNotRefresh()){for(var n=!1,r=!1,o=0;o<t.length;o++){var s=t[o];if("attributes"!==s.type){n=!0;break}if(s.target!==this.scroll.scroller.content){r=!0;break}}n?this.scroll.refresh():r&&(clearTimeout(e),e=window.setTimeout((function(){i.shouldNotRefresh()||i.scroll.refresh()}),60))}},t.prototype.startObserve=function(t){t.observe(this.scroll.scroller.content,{attributes:!0,childList:!0,subtree:!0})},t.prototype.shouldNotRefresh=function(){var t=this.scroll.scroller,e=t.scrollBehaviorX,i=t.scrollBehaviorY,n=e.currentPos>e.minScrollPos||e.currentPos<e.maxScrollPos||i.currentPos>i.minScrollPos||i.currentPos<i.maxScrollPos;return t.animater.pending||n},t.prototype.checkDOMUpdate=function(){var t=this,e=this.scroll.scroller.content,i=Qe(e),n=i.width,r=i.height,o=function(){setTimeout((function(){!function(){if(!t.stopObserver){var s=(i=Qe(e)).width,a=i.height;n===s&&r===a||t.scroll.refresh(),n=s,r=a,o()}}()}),1e3)};o()},t.prototype.registerHooks=function(t,e,i){t.on(e,i,this),this.hooksFn.push([t,e,i])},t.prototype.stopObserve=function(){this.stopObserver=!0,this.observer&&this.observer.disconnect()},t.prototype.destroy=function(){this.stopObserve(),this.hooksFn.forEach((function(t){var e=t[0],i=t[1],n=t[2];e.off(i,n)})),this.hooksFn.length=0},t.pluginName="observeDOM",t}(),zi=[{key:"finishPullDown",name:"finishPullDown"},{key:"openPullDown",name:"openPullDown"},{key:"closePullDown",name:"closePullDown"},{key:"autoPullDownRefresh",name:"autoPullDownRefresh"}].map((function(t){return{key:t.key,sourceKey:"plugins.pullDownRefresh."+t.name}})),Ni=function(){function t(t){this.scroll=t,this.pulling=0,this.thresholdBoundary=0,this.init()}return t.prototype.setPulling=function(t){this.pulling=t},t.prototype.setThresholdBoundary=function(t){this.thresholdBoundary=t},t.prototype.init=function(){this.handleBScroll(),this.handleOptions(this.scroll.options.pullDownRefresh),this.handleHooks(),this.watch()},t.prototype.handleBScroll=function(){this.scroll.registerType(["pullingDown","enterThreshold","leaveThreshold"]),this.scroll.proxy(zi)},t.prototype.handleOptions=function(t){void 0===t&&(t={}),t=!0===t?{}:t;this.options=Ae({threshold:90,stop:40},t),this.scroll.options.probeType=3},t.prototype.handleHooks=function(){var t=this;this.hooksFn=[];var e=this.scroll.scroller,i=e.scrollBehaviorY;this.currentMinScrollY=this.cachedOriginanMinScrollY=i.minScrollPos,this.registerHooks(this.scroll.hooks,this.scroll.hooks.eventTypes.contentChanged,(function(){t.finishPullDown()})),this.registerHooks(i.hooks,i.hooks.eventTypes.computeBoundary,(function(e){e.maxScrollPos>0&&(e.maxScrollPos=-1),e.minScrollPos=t.currentMinScrollY})),this.hasMouseWheelPlugin()&&(this.registerHooks(this.scroll,this.scroll.eventTypes.alterOptions,(function(t){t.discreteTime=300,t.easeTime=350})),this.registerHooks(this.scroll,this.scroll.eventTypes.mousewheelEnd,(function(){e.hooks.trigger(e.hooks.eventTypes.end)})))},t.prototype.registerHooks=function(t,e,i){t.on(e,i,this),this.hooksFn.push([t,e,i])},t.prototype.hasMouseWheelPlugin=function(){return!!this.scroll.eventTypes.alterOptions},t.prototype.watch=function(){var t=this.scroll.scroller;this.watching=!0,this.registerHooks(t.hooks,t.hooks.eventTypes.end,this.checkPullDown),this.registerHooks(this.scroll,this.scroll.eventTypes.scrollStart,this.resetStateBeforeScrollStart),this.registerHooks(this.scroll,this.scroll.eventTypes.scroll,this.checkLocationOfThresholdBoundary),this.hasMouseWheelPlugin()&&this.registerHooks(this.scroll,this.scroll.eventTypes.mousewheelStart,this.resetStateBeforeScrollStart)},t.prototype.resetStateBeforeScrollStart=function(){this.isFetchingStatus()||(this.setPulling(1),this.setThresholdBoundary(0))},t.prototype.checkLocationOfThresholdBoundary=function(){if(1===this.pulling){var t=this.scroll,e=1!==this.thresholdBoundary&&this.locateInsideThresholdBoundary(),i=2!==this.thresholdBoundary&&!this.locateInsideThresholdBoundary();e&&(this.setThresholdBoundary(1),t.trigger("enterThreshold")),i&&(this.setThresholdBoundary(2),t.trigger("leaveThreshold"))}},t.prototype.locateInsideThresholdBoundary=function(){return this.scroll.y<=this.options.threshold},t.prototype.unwatch=function(){var t=this.scroll,e=t.scroller;this.watching=!1,e.hooks.off(e.hooks.eventTypes.end,this.checkPullDown),t.off(t.eventTypes.scrollStart,this.resetStateBeforeScrollStart),t.off(t.eventTypes.scroll,this.checkLocationOfThresholdBoundary),this.hasMouseWheelPlugin()&&t.off(t.eventTypes.mousewheelStart,this.resetStateBeforeScrollStart)},t.prototype.checkPullDown=function(){var t=this.options,e=t.threshold,i=t.stop;return!(this.scroll.y<e)&&(1===this.pulling&&(this.modifyBehaviorYBoundary(i),this.setPulling(2),this.scroll.trigger("pullingDown")),this.scroll.scrollTo(this.scroll.x,i,this.scroll.options.bounceTime,ni.bounce),this.isFetchingStatus())},t.prototype.isFetchingStatus=function(){return 2===this.pulling},t.prototype.modifyBehaviorYBoundary=function(t){var e=this.scroll.scroller.scrollBehaviorY;this.cachedOriginanMinScrollY=e.minScrollPos,this.currentMinScrollY=t,e.computeBoundary()},t.prototype.finishPullDown=function(){if(this.isFetchingStatus()){var t=this.scroll.scroller.scrollBehaviorY;this.currentMinScrollY=this.cachedOriginanMinScrollY,t.computeBoundary(),this.setPulling(0),this.scroll.resetPosition(this.scroll.options.bounceTime,ni.bounce)}},t.prototype.openPullDown=function(t){void 0===t&&(t={}),this.handleOptions(t),this.watching||this.watch()},t.prototype.closePullDown=function(){this.unwatch()},t.prototype.autoPullDownRefresh=function(){var t=this.options,e=t.threshold,i=t.stop;!this.isFetchingStatus()&&this.watching&&(this.modifyBehaviorYBoundary(i),this.scroll.trigger(this.scroll.eventTypes.scrollStart),this.scroll.scrollTo(this.scroll.x,e),this.setPulling(2),this.scroll.trigger("pullingDown"),this.scroll.scrollTo(this.scroll.x,i,this.scroll.options.bounceTime,ni.bounce))},t.pluginName="pullDownRefresh",t}(),Hi=[{key:"finishPullUp",name:"finishPullUp"},{key:"openPullUp",name:"openPullUp"},{key:"closePullUp",name:"closePullUp"},{key:"autoPullUpLoad",name:"autoPullUpLoad"}].map((function(t){return{key:t.key,sourceKey:"plugins.pullUpLoad."+t.name}})),Li=function(){function t(t){this.scroll=t,this.pulling=!1,this.watching=!1,this.init()}return t.prototype.init=function(){this.handleBScroll(),this.handleOptions(this.scroll.options.pullUpLoad),this.handleHooks(),this.watch()},t.prototype.handleBScroll=function(){this.scroll.registerType(["pullingUp"]),this.scroll.proxy(Hi)},t.prototype.handleOptions=function(t){void 0===t&&(t={}),t=!0===t?{}:t;this.options=Ae({threshold:0},t),this.scroll.options.probeType=3},t.prototype.handleHooks=function(){var t=this;this.hooksFn=[];var e=this.scroll.scroller.scrollBehaviorY;this.registerHooks(this.scroll.hooks,this.scroll.hooks.eventTypes.contentChanged,(function(){t.finishPullUp()})),this.registerHooks(e.hooks,e.hooks.eventTypes.computeBoundary,(function(t){t.maxScrollPos>0&&(t.maxScrollPos=-1)}))},t.prototype.registerHooks=function(t,e,i){t.on(e,i,this),this.hooksFn.push([t,e,i])},t.prototype.watch=function(){this.watching||(this.watching=!0,this.registerHooks(this.scroll,this.scroll.eventTypes.scroll,this.checkPullUp))},t.prototype.unwatch=function(){this.watching=!1,this.scroll.off(this.scroll.eventTypes.scroll,this.checkPullUp)},t.prototype.checkPullUp=function(t){var e=this,i=this.options.threshold;1===this.scroll.movingDirectionY&&t.y<=this.scroll.maxScrollY+i&&(this.pulling=!0,this.scroll.once(this.scroll.eventTypes.scrollEnd,(function(){e.pulling=!1})),this.unwatch(),this.scroll.trigger("pullingUp"))},t.prototype.finishPullUp=function(){var t=this;this.scroll.scroller.scrollBehaviorY.setMovingDirection(0),this.pulling?this.scroll.once(this.scroll.eventTypes.scrollEnd,(function(){t.watch()})):this.watch()},t.prototype.openPullUp=function(t){void 0===t&&(t={}),this.handleOptions(t),this.watch()},t.prototype.closePullUp=function(){this.unwatch()},t.prototype.autoPullUpLoad=function(){var t=this.options.threshold,e=this.scroll.scroller.scrollBehaviorY;if(!this.pulling&&this.watching){var i=e.maxScrollPos+t+-1;this.scroll.scroller.scrollBehaviorY.setMovingDirection(-1),this.scroll.scrollTo(this.scroll.x,i,this.scroll.options.bounceTime)}},t.pluginName="pullUpLoad",t}(),Xi=function(){function t(t,e){this.indicator=t,this.options=e,this.hooks=new hi(["touchStart","touchMove","touchEnd"]),this.registerEvents()}return t.prototype.registerEvents=function(){var t=this.options,e=t.disableMouse,i=t.disableTouch,n=[],r=[],o=[];e||(n.push({name:"mousedown",handler:this.start.bind(this)}),r.push({name:"mousemove",handler:this.move.bind(this)}),o.push({name:"mouseup",handler:this.end.bind(this)})),i||(n.push({name:"touchstart",handler:this.start.bind(this)}),r.push({name:"touchmove",handler:this.move.bind(this)}),o.push({name:"touchend",handler:this.end.bind(this)},{name:"touchcancel",handler:this.end.bind(this)})),this.startEventRegister=new ui(this.indicator.indicatorEl,n),this.moveEventRegister=new ui(window,r),this.endEventRegister=new ui(window,o)},t.prototype.BScrollIsDisabled=function(){return!this.indicator.scroll.enabled},t.prototype.start=function(t){if(!this.BScrollIsDisabled()){var e=t.touches?t.touches[0]:t;t.preventDefault(),t.stopPropagation(),this.initiated=!0,this.lastPoint=e[this.indicator.keysMap.point],this.hooks.trigger(this.hooks.eventTypes.touchStart)}},t.prototype.move=function(t){if(this.initiated){var e=(t.touches?t.touches[0]:t)[this.indicator.keysMap.point];t.preventDefault(),t.stopPropagation();var i=e-this.lastPoint;this.lastPoint=e,this.hooks.trigger(this.hooks.eventTypes.touchMove,i)}},t.prototype.end=function(t){this.initiated&&(this.initiated=!1,t.preventDefault(),t.stopPropagation(),this.hooks.trigger(this.hooks.eventTypes.touchEnd))},t.prototype.destroy=function(){this.startEventRegister.destroy(),this.moveEventRegister.destroy(),this.endEventRegister.destroy()},t}(),Fi=function(){function t(t,e){this.scroll=t,this.options=e,this.hooksFn=[],this.wrapper=e.wrapper,this.direction=e.direction,this.indicatorEl=this.wrapper.children[0],this.keysMap=this.getKeysMap(),this.handleFade(),this.handleHooks()}return t.prototype.handleFade=function(){this.options.fade&&(this.wrapper.style.opacity="0")},t.prototype.handleHooks=function(){var t=this,e=this.options,i=e.fade,n=e.interactive,r=e.scrollbarTrackClickable,o=this.scroll,s=o.hooks,a=o.scroller.translater.hooks,l=o.scroller.animater.hooks;if(this.registerHooks(s,s.eventTypes.refresh,this.refresh),this.registerHooks(a,a.eventTypes.translate,(function(e){var i=t.keysMap.hasScroll;t.scroll[i]&&t.updatePosition(e)})),this.registerHooks(l,l.eventTypes.time,this.transitionTime),this.registerHooks(l,l.eventTypes.timeFunction,this.transitionTimingFunction),i&&(this.registerHooks(o,o.eventTypes.scrollEnd,(function(){t.fade()})),this.registerHooks(o,o.eventTypes.scrollStart,(function(){t.fade(!0)})),o.eventTypes.mousewheelStart&&o.eventTypes.mousewheelEnd&&(this.registerHooks(o,o.eventTypes.mousewheelStart,(function(){t.fade(!0)})),this.registerHooks(o,o.eventTypes.mousewheelMove,(function(){t.fade(!0)})),this.registerHooks(o,o.eventTypes.mousewheelEnd,(function(){t.fade()})))),n){var c=this.scroll.options,h=c.disableMouse,u=c.disableTouch;this.eventHandler=new Xi(this,{disableMouse:h,disableTouch:u});var f=this.eventHandler.hooks;this.registerHooks(f,f.eventTypes.touchStart,this.startHandler),this.registerHooks(f,f.eventTypes.touchMove,this.moveHandler),this.registerHooks(f,f.eventTypes.touchEnd,this.endHandler)}r&&this.bindClick()},t.prototype.registerHooks=function(t,e,i){t.on(e,i,this),this.hooksFn.push([t,e,i])},t.prototype.bindClick=function(){var t=this.wrapper;this.clickEventRegister=new ui(t,[{name:"click",handler:this.handleClick.bind(this)}])},t.prototype.handleClick=function(t){var e=this.calculateclickOffsetPos(t),i=this.scroll,n=i.x,r=i.y;n="horizontal"===this.direction?e:n,r="vertical"===this.direction?e:r,this.scroll.scrollTo(n,r,this.options.scrollbarTrackOffsetTime)},t.prototype.calculateclickOffsetPos=function(t){var e=this.keysMap,i=e.point,n=e.domRect,r=this.options.scrollbarTrackOffsetType,o=t[i]-this.wrapperRect[n],s=o<this.currentPos?-1:1,a=0,l=this.currentPos;return"step"===r?a=this.scrollInfo.baseSize*s:(a=0,l=o),this.newPos(l,a,this.scrollInfo)},t.prototype.getKeysMap=function(){return"vertical"===this.direction?{hasScroll:"hasVerticalScroll",size:"height",wrapperSize:"clientHeight",scrollerSize:"scrollerHeight",maxScrollPos:"maxScrollY",pos:"y",point:"pageY",translateProperty:"translateY",domRect:"top"}:{hasScroll:"hasHorizontalScroll",size:"width",wrapperSize:"clientWidth",scrollerSize:"scrollerWidth",maxScrollPos:"maxScrollX",pos:"x",point:"pageX",translateProperty:"translateX",domRect:"left"}},t.prototype.fade=function(t){var e=this.options,i=e.fadeInTime,n=e.fadeOutTime,r=t?i:n,o=this.wrapper;o.style[Ke.transitionDuration]=r+"ms",o.style.opacity=t?"1":"0"},t.prototype.refresh=function(){var t=this.keysMap.hasScroll,e=this.scroll,i=e.x,n=e.y;if(this.wrapperRect=this.wrapper.getBoundingClientRect(),this.canScroll(e[t])){var r=this.keysMap,o=r.wrapperSize,s=r.scrollerSize,a=r.maxScrollPos;this.scrollInfo=this.refreshScrollInfo(this.wrapper[o],e[s],e[a],this.indicatorEl[o]),this.updatePosition({x:i,y:n})}},t.prototype.transitionTime=function(t){void 0===t&&(t=0),this.indicatorEl.style[Ke.transitionDuration]=t+"ms"},t.prototype.transitionTimingFunction=function(t){this.indicatorEl.style[Ke.transitionTimingFunction]=t},t.prototype.canScroll=function(t){return this.wrapper.style.display=t?"block":"none",t},t.prototype.refreshScrollInfo=function(t,e,i,n){var r=Math.max(Math.round(t*t/(e||t||1)),this.options.minSize);this.options.isCustom&&(r=n);var o=t-r;return{baseSize:r,maxScrollPos:o,minScrollPos:0,sizeRatio:o/i}},t.prototype.updatePosition=function(t){var e=this.caculatePosAndSize(t,this.scrollInfo),i=e.pos,n=e.size;this.refreshStyle(n,i),this.currentPos=i},t.prototype.caculatePosAndSize=function(t,e){var i,n=this.keysMap.pos,r=e.sizeRatio,o=e.baseSize,s=e.maxScrollPos,a=e.minScrollPos,l=this.options.minSize,c=Math.round(r*t[n]);return c<a?(i=Math.max(o+3*c,l),c=a):c>s?c=s+o-(i=Math.max(o-3*(c-s),l)):i=o,{pos:c,size:i}},t.prototype.refreshStyle=function(t,e){var i=this.keysMap,n=i.translateProperty,r=i.size,o=this.scroll.options.translateZ;this.indicatorEl.style[r]=t+"px",this.indicatorEl.style[Ke.transform]=n+"("+e+"px)"+o},t.prototype.startHandler=function(){this.moved=!1,this.startTime=Ee(),this.transitionTime(),this.scroll.scroller.hooks.trigger(this.scroll.scroller.hooks.eventTypes.beforeScrollStart)},t.prototype.moveHandler=function(t){if(this.moved||this.indicatorNotMoved(t)||(this.moved=!0,this.scroll.scroller.hooks.trigger(this.scroll.scroller.hooks.eventTypes.scrollStart)),this.moved){var e=this.newPos(this.currentPos,t,this.scrollInfo);this.syncBScroll(e)}},t.prototype.endHandler=function(){if(this.moved){var t=this.scroll,e=t.x,i=t.y;this.scroll.scroller.hooks.trigger(this.scroll.scroller.hooks.eventTypes.scrollEnd,{x:e,y:i})}},t.prototype.indicatorNotMoved=function(t){var e=this.currentPos,i=this.scrollInfo,n=i.maxScrollPos;return e===i.minScrollPos&&t<=0||e===n&&t>=0},t.prototype.syncBScroll=function(t){var e=Ee(),i=this.scroll,n=i.x,r=i.y,o=i.options,s=i.scroller,a=i.maxScrollY,l=i.minScrollY,c=i.maxScrollX,h=i.minScrollX,u=o.probeType,f=o.momentumLimitTime,p={x:n,y:r};"vertical"===this.direction?p.y=Ye(t,a,l):p.x=Ye(t,c,h),s.translater.translate(p),e-this.startTime>f&&(this.startTime=e,1===u&&s.hooks.trigger(s.hooks.eventTypes.scroll,p)),u>1&&s.hooks.trigger(s.hooks.eventTypes.scroll,p)},t.prototype.newPos=function(t,e,i){var n=i.maxScrollPos,r=i.sizeRatio,o=t+e;return o=Ye(o,i.minScrollPos,n),Math.round(o/r)},t.prototype.destroy=function(){var t=this.options,e=t.interactive,i=t.scrollbarTrackClickable,n=t.isCustom;e&&this.eventHandler.destroy(),i&&this.clickEventRegister.destroy(),n||this.wrapper.parentNode.removeChild(this.wrapper),this.hooksFn.forEach((function(t){var e=t[0],i=t[1],n=t[2];e.off(i,n)})),this.hooksFn.length=0},t}(),ji=function(){function t(t){this.scroll=t,this.handleOptions(),this.createIndicators(),this.handleHooks()}return t.prototype.handleHooks=function(){var t=this,e=this.scroll;e.hooks.on(e.hooks.eventTypes.destroy,(function(){for(var e=0,i=t.indicators;e<i.length;e++){i[e].destroy()}}))},t.prototype.handleOptions=function(){var t=!0===this.scroll.options.scrollbar?{}:this.scroll.options.scrollbar;this.options=Ae({fade:!0,fadeInTime:250,fadeOutTime:500,interactive:!1,customElements:[],minSize:8,scrollbarTrackClickable:!1,scrollbarTrackOffsetType:"step",scrollbarTrackOffsetTime:300},t)},t.prototype.createIndicators=function(){for(var t,e=this.scroll,i=[],n=["scrollX","scrollY"],r=["horizontal","vertical"],o=this.options.customElements,s=0;s<n.length;s++){var a=n[s];if(e.options[a]){var l=o.shift(),c=r[s],h=!1,u=l||this.createScrollbarElement(c);u!==l?e.wrapper.appendChild(u):h=!0,t=ye(ye({wrapper:u,direction:c},this.options),{isCustom:h}),i.push(new Fi(e,t))}}this.indicators=i},t.prototype.createScrollbarElement=function(t,e){void 0===e&&(e=this.options.scrollbarTrackClickable);var i=document.createElement("div"),n=document.createElement("div");return i.style.cssText="position:absolute;z-index:9999;overflow:hidden;",n.style.cssText="box-sizing:border-box;position:absolute;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);border-radius:3px;",n.className="bscroll-indicator","horizontal"===t?(i.style.cssText+="height:7px;left:2px;right:2px;bottom:0;",n.style.height="100%",i.className="bscroll-horizontal-scrollbar"):(i.style.cssText+="width:7px;bottom:2px;top:2px;right:1px;",n.style.width="100%",i.className="bscroll-vertical-scrollbar"),e||(i.style.cssText+="pointer-events:none;"),i.appendChild(n),i},t.pluginName="scrollbar",t}(),Ri=function(){function t(t){this.scroll=t,this.init()}return t.prototype.init=function(){var t=this.scroll.scroller,e=t.scrollBehaviorX,i=t.scrollBehaviorY;this.wrapperWidth=e.wrapperSize,this.wrapperHeight=i.wrapperSize,this.scrollerHeight=i.contentSize,this.scrollerWidth=e.contentSize,this.pages=this.buildPagesMatrix(this.wrapperWidth,this.wrapperHeight),this.pageLengthOfX=this.pages?this.pages.length:0,this.pageLengthOfY=this.pages&&this.pages[0]?this.pages[0].length:0},t.prototype.getPageStats=function(t,e){return this.pages[t][e]},t.prototype.getNearestPageIndex=function(t,e){for(var i=0,n=0,r=this.pages.length;i<r-1&&!(t>=this.pages[i][0].cx);i++);for(r=this.pages[i].length;n<r-1&&!(e>=this.pages[0][n].cy);n++);return{pageX:i,pageY:n}},t.prototype.buildPagesMatrix=function(t,e){var i,n,r,o,s=[],a=0,l=0,c=this.scroll.scroller.scrollBehaviorX.maxScrollPos,h=this.scroll.scroller.scrollBehaviorY.maxScrollPos;for(n=Math.round(t/2),r=Math.round(e/2);a>-this.scrollerWidth;){for(s[l]=[],o=0,i=0;i>-this.scrollerHeight;)s[l][o]={x:Math.max(a,c),y:Math.max(i,h),width:t,height:e,cx:a-n,cy:i-r},i-=e,o++;a-=t,l++}return s},t}(),$i={pageX:0,pageY:0,x:0,y:0},Wi=function(){function t(t,e){this.scroll=t,this.slideOptions=e,this.slideX=!1,this.slideY=!1,this.currentPage=Ae({},$i)}return t.prototype.refresh=function(){this.pagesMatrix=new Ri(this.scroll),this.checkSlideLoop(),this.currentPage=this.getAdjustedCurrentPage()},t.prototype.getAdjustedCurrentPage=function(){var t=this.currentPage,e=t.pageX,i=t.pageY;e=Math.min(e,this.pagesMatrix.pageLengthOfX-1),i=Math.min(i,this.pagesMatrix.pageLengthOfY-1),this.loopX&&(e=Math.min(e,this.pagesMatrix.pageLengthOfX-2)),this.loopY&&(i=Math.min(i,this.pagesMatrix.pageLengthOfY-2));var n=this.pagesMatrix.getPageStats(e,i);return{pageX:e,pageY:i,x:n.x,y:n.y}},t.prototype.setCurrentPage=function(t){this.currentPage=t},t.prototype.getInternalPage=function(t,e){t>=this.pagesMatrix.pageLengthOfX?t=this.pagesMatrix.pageLengthOfX-1:t<0&&(t=0),e>=this.pagesMatrix.pageLengthOfY?e=this.pagesMatrix.pageLengthOfY-1:e<0&&(e=0);var i=this.pagesMatrix.getPageStats(t,e);return{pageX:t,pageY:e,x:i.x,y:i.y}},t.prototype.getInitialPage=function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var i=this.slideOptions,n=i.startPageXIndex,r=i.startPageYIndex,o=this.loopX?1:0,s=this.loopY?1:0,a=t?o:this.currentPage.pageX,l=t?s:this.currentPage.pageY;e?(a=this.loopX?n+1:n,l=this.loopY?r+1:r):(a=t?o:this.currentPage.pageX,l=t?s:this.currentPage.pageY);var c=this.pagesMatrix.getPageStats(a,l);return{pageX:a,pageY:l,x:c.x,y:c.y}},t.prototype.getExposedPage=function(t){var e=Ae({},t);return this.loopX&&(e.pageX=this.fixedPage(e.pageX,this.pagesMatrix.pageLengthOfX-2)),this.loopY&&(e.pageY=this.fixedPage(e.pageY,this.pagesMatrix.pageLengthOfY-2)),e},t.prototype.getExposedPageByPageIndex=function(t,e){var i={pageX:t,pageY:e};this.loopX&&(i.pageX=t+1),this.loopY&&(i.pageY=e+1);var n=this.pagesMatrix.getPageStats(i.pageX,i.pageY);return{x:n.x,y:n.y,pageX:t,pageY:e}},t.prototype.getWillChangedPage=function(t){return t=Ae({},t),this.loopX&&(t.pageX=this.fixedPage(t.pageX,this.pagesMatrix.pageLengthOfX-2),t.x=this.pagesMatrix.getPageStats(t.pageX+1,0).x),this.loopY&&(t.pageY=this.fixedPage(t.pageY,this.pagesMatrix.pageLengthOfY-2),t.y=this.pagesMatrix.getPageStats(0,t.pageY+1).y),t},t.prototype.fixedPage=function(t,e){for(var i=[],n=0;n<e;n++)i.push(n);return i.unshift(e-1),i.push(0),i[t]},t.prototype.getPageStats=function(){return this.pagesMatrix.getPageStats(this.currentPage.pageX,this.currentPage.pageY)},t.prototype.getValidPageIndex=function(t,e){var i=this.pagesMatrix.pageLengthOfX-1,n=this.pagesMatrix.pageLengthOfY-1,r=0,o=0;return this.loopX&&(t+=1,r+=1,i-=1),this.loopY&&(e+=1,o+=1,n-=1),{pageX:t=Ye(t,r,i),pageY:e=Ye(e,o,n)}},t.prototype.nextPageIndex=function(){return this.getPageIndexByDirection("positive")},t.prototype.prevPageIndex=function(){return this.getPageIndexByDirection("negative")},t.prototype.getNearestPage=function(t,e){var i=this.pagesMatrix.getNearestPageIndex(t,e),n=i.pageX,r=i.pageY;return{x:this.pagesMatrix.getPageStats(n,0).x,y:this.pagesMatrix.getPageStats(0,r).y,pageX:n,pageY:r}},t.prototype.getPageByDirection=function(t,e,i){var n=t.pageX,r=t.pageY;return n===this.currentPage.pageX&&(n=Ye(n+e,0,this.pagesMatrix.pageLengthOfX-1)),r===this.currentPage.pageY&&(r=Ye(r+i,0,this.pagesMatrix.pageLengthOfY-1)),{x:this.pagesMatrix.getPageStats(n,0).x,y:this.pagesMatrix.getPageStats(0,r).y,pageX:n,pageY:r}},t.prototype.resetLoopPage=function(){if(this.loopX){if(0===this.currentPage.pageX)return{pageX:this.pagesMatrix.pageLengthOfX-2,pageY:this.currentPage.pageY};if(this.currentPage.pageX===this.pagesMatrix.pageLengthOfX-1)return{pageX:1,pageY:this.currentPage.pageY}}if(this.loopY){if(0===this.currentPage.pageY)return{pageX:this.currentPage.pageX,pageY:this.pagesMatrix.pageLengthOfY-2};if(this.currentPage.pageY===this.pagesMatrix.pageLengthOfY-1)return{pageX:this.currentPage.pageX,pageY:1}}},t.prototype.getPageIndexByDirection=function(t){var e=this.currentPage.pageX,i=this.currentPage.pageY;return this.slideX&&(e="negative"===t?e-1:e+1),this.slideY&&(i="negative"===t?i-1:i+1),{pageX:e,pageY:i}},t.prototype.checkSlideLoop=function(){this.wannaLoop=this.slideOptions.loop,this.pagesMatrix.pageLengthOfX>1?this.slideX=!0:this.slideX=!1,this.pagesMatrix.pages[0]&&this.pagesMatrix.pageLengthOfY>1?this.slideY=!0:this.slideY=!1,this.loopX=this.wannaLoop&&this.slideX,this.loopY=this.wannaLoop&&this.slideY,this.slideX&&this.slideY&&ke("slide does not support two direction at the same time.")},t}(),Gi=[{key:"next",name:"next"},{key:"prev",name:"prev"},{key:"goToPage",name:"goToPage"},{key:"getCurrentPage",name:"getCurrentPage"},{key:"startPlay",name:"startPlay"},{key:"pausePlay",name:"pausePlay"}].map((function(t){return{key:t.key,sourceKey:"plugins.slide."+t.name}})),Vi=function(){function t(t){this.scroll=t,this.cachedClonedPageDOM=[],this.resetLooping=!1,this.autoplayTimer=0,this.satisfyInitialization()&&this.init()}return t.prototype.satisfyInitialization=function(){return!(this.scroll.scroller.content.children.length<=0)||(ke("slide need at least one slide page to be initialised.please check your DOM layout."),!1)},t.prototype.init=function(){this.willChangeToPage=Ae({},$i),this.handleBScroll(),this.handleOptions(),this.handleHooks(),this.createPages()},t.prototype.createPages=function(){this.pages=new Wi(this.scroll,this.options)},t.prototype.handleBScroll=function(){this.scroll.registerType(["slideWillChange","slidePageChanged"]),this.scroll.proxy(Gi)},t.prototype.handleOptions=function(){var t=!0===this.scroll.options.slide?{}:this.scroll.options.slide,e={loop:!0,threshold:.1,speed:400,easing:ni.bounce,listenFlick:!0,autoplay:!0,interval:3e3,startPageXIndex:0,startPageYIndex:0};this.options=Ae(e,t)},t.prototype.handleLoop=function(t){var e=this.options.loop,i=this.scroll.scroller.content,n=i.children.length;e&&(i!==t?(this.resetLoopChangedStatus(),this.removeClonedSlidePage(t),n>1&&this.cloneFirstAndLastSlidePage(i)):3===n&&this.initialised?(this.removeClonedSlidePage(i),this.moreToOnePageInLoop=!0,this.oneToMorePagesInLoop=!1):n>1?(this.initialised&&0===this.cachedClonedPageDOM.length?(this.oneToMorePagesInLoop=!0,this.moreToOnePageInLoop=!1):(this.removeClonedSlidePage(i),this.resetLoopChangedStatus()),this.cloneFirstAndLastSlidePage(i)):this.resetLoopChangedStatus())},t.prototype.resetLoopChangedStatus=function(){this.moreToOnePageInLoop=!1,this.oneToMorePagesInLoop=!1},t.prototype.handleHooks=function(){var t=this,e=this.scroll.hooks,i=this.scroll.scroller.hooks,n=this.options.listenFlick;this.prevContent=this.scroll.scroller.content,this.hooksFn=[],this.registerHooks(this.scroll,this.scroll.eventTypes.beforeScrollStart,this.pausePlay),this.registerHooks(this.scroll,this.scroll.eventTypes.scrollEnd,this.modifyCurrentPage),this.registerHooks(this.scroll,this.scroll.eventTypes.scrollEnd,this.startPlay),this.scroll.eventTypes.mousewheelMove&&(this.registerHooks(this.scroll,this.scroll.eventTypes.mousewheelMove,(function(){return!0})),this.registerHooks(this.scroll,this.scroll.eventTypes.mousewheelEnd,(function(e){1!==e.directionX&&1!==e.directionY||t.next(),-1!==e.directionX&&-1!==e.directionY||t.prev()}))),this.registerHooks(e,e.eventTypes.refresh,this.refreshHandler),this.registerHooks(e,e.eventTypes.destroy,this.destroy),this.registerHooks(i,i.eventTypes.beforeRefresh,(function(){t.handleLoop(t.prevContent),t.setSlideInlineStyle()})),this.registerHooks(i,i.eventTypes.momentum,this.modifyScrollMetaHandler),this.registerHooks(i,i.eventTypes.scroll,this.scrollHandler),this.registerHooks(i,i.eventTypes.checkClick,this.startPlay),n&&this.registerHooks(i,i.eventTypes.flick,this.flickHandler)},t.prototype.startPlay=function(){var t=this,e=this.options,i=e.interval;e.autoplay&&(clearTimeout(this.autoplayTimer),this.autoplayTimer=window.setTimeout((function(){t.next()}),i))},t.prototype.pausePlay=function(){this.options.autoplay&&clearTimeout(this.autoplayTimer)},t.prototype.setSlideInlineStyle=function(){var t=this.scroll.scroller,e=t.content,i=t.wrapper,n=this.scroll.options;[{direction:"scrollX",sizeType:"offsetWidth",styleType:"width"},{direction:"scrollY",sizeType:"offsetHeight",styleType:"height"}].forEach((function(t){var r=t.direction,o=t.sizeType,s=t.styleType;if(n[r]){for(var a=i[o],l=e.children,c=l.length,h=0;h<c;h++){l[h].style[s]=a+"px"}e.style[s]=a*c+"px"}}))},t.prototype.next=function(t,e){var i=this.pages.nextPageIndex(),n=i.pageX,r=i.pageY;this.goTo(n,r,t,e)},t.prototype.prev=function(t,e){var i=this.pages.prevPageIndex(),n=i.pageX,r=i.pageY;this.goTo(n,r,t,e)},t.prototype.goToPage=function(t,e,i,n){var r=this.pages.getValidPageIndex(t,e);this.goTo(r.pageX,r.pageY,i,n)},t.prototype.getCurrentPage=function(){return this.exposedPage||this.pages.getInitialPage(!1,!0)},t.prototype.setCurrentPage=function(t){this.pages.setCurrentPage(t),this.exposedPage=this.pages.getExposedPage(t)},t.prototype.nearestPage=function(t,e){var i=this.scroll.scroller,n=i.scrollBehaviorX,r=i.scrollBehaviorY,o=n.maxScrollPos,s=n.minScrollPos,a=r.maxScrollPos,l=r.minScrollPos;return this.pages.getNearestPage(Ye(t,o,s),Ye(e,a,l))},t.prototype.satisfyThreshold=function(t,e){var i=this.scroll.scroller,n=i.scrollBehaviorX,r=i.scrollBehaviorY,o=!0;return Math.abs(t-n.absStartPos)<=this.thresholdX&&Math.abs(e-r.absStartPos)<=this.thresholdY&&(o=!1),o},t.prototype.refreshHandler=function(t){var e=this;if(this.satisfyInitialization()){this.pages.refresh(),this.computeThreshold();var i=this.contentChanged=this.prevContent!==t;i&&(this.prevContent=t);var n=this.pages.getInitialPage(this.oneToMorePagesInLoop||this.moreToOnePageInLoop,i||!this.initialised);this.initialised?this.goTo(n.pageX,n.pageY,0):this.registerHooks(this.scroll.hooks,this.scroll.hooks.eventTypes.beforeInitialScrollTo,(function(t){e.initialised=!0,t.x=n.x,t.y=n.y})),this.startPlay()}},t.prototype.computeThreshold=function(){var t=this.options.threshold;if(t%1==0)this.thresholdX=t,this.thresholdY=t;else{var e=this.pages.getPageStats(),i=e.width,n=e.height;this.thresholdX=Math.round(i*t),this.thresholdY=Math.round(n*t)}},t.prototype.cloneFirstAndLastSlidePage=function(t){var e,i,n,r=t.children,o=r[r.length-1].cloneNode(!0),s=r[0].cloneNode(!0);e=o,(n=(i=t).firstChild)?function(t,e){e.parentNode.insertBefore(t,e)}(e,n):i.appendChild(e),t.appendChild(s),this.cachedClonedPageDOM=[o,s]},t.prototype.removeClonedSlidePage=function(t){(t&&t.children||[]).length&&this.cachedClonedPageDOM.forEach((function(e){!function(t,e){t.removeChild(e)}(t,e)})),this.cachedClonedPageDOM=[]},t.prototype.modifyCurrentPage=function(t){var e=this.getCurrentPage(),i=e.pageX,n=e.pageY,r=this.nearestPage(t.x,t.y);if(this.setCurrentPage(r),this.contentChanged)return this.contentChanged=!1,!0;var o=this.getCurrentPage(),s=o.pageX,a=o.pageY;if(this.pageWillChangeTo(r),this.oneToMorePagesInLoop)return this.oneToMorePagesInLoop=!1,!0;if(this.moreToOnePageInLoop&&0===i&&0===n)return this.moreToOnePageInLoop=!1,!0;if(i!==s||n!==a){var l=this.pages.getExposedPageByPageIndex(s,a);this.scroll.trigger(this.scroll.eventTypes.slidePageChanged,l)}if(!this.resetLooping){var c=this.pages.resetLoopPage();return c?(this.resetLooping=!0,this.goTo(c.pageX,c.pageY,0),!0):void 0}this.resetLooping=!1},t.prototype.goTo=function(t,e,i,n){var r=this.pages.getInternalPage(t,e),o=n||this.options.easing||ni.bounce,s=r.x,a=r.y,l=s-this.scroll.scroller.scrollBehaviorX.currentPos,c=a-this.scroll.scroller.scrollBehaviorY.currentPos;l||c?(i=void 0===i?this.getEaseTime(l,c):i,this.scroll.scroller.scrollTo(s,a,i,o)):this.scroll.scroller.togglePointerEvents(!0)},t.prototype.flickHandler=function(){var t=this.scroll.scroller,e=t.scrollBehaviorX,i=t.scrollBehaviorY,n=e.currentPos,r=e.startPos,o=e.direction,s=i.currentPos,a=i.startPos,l=i.direction,c=this.pages.currentPage,h=c.pageX,u=c.pageY,f=this.getEaseTime(n-r,s-a);this.goTo(h+o,u+l,f)},t.prototype.getEaseTime=function(t,e){return this.options.speed||Math.max(Math.max(Math.min(Math.abs(t),1e3),Math.min(Math.abs(e),1e3)),300)},t.prototype.modifyScrollMetaHandler=function(t){var e=this.scroll.scroller,i=e.scrollBehaviorX,n=e.scrollBehaviorY,r=e.animater,o=t.newX,s=t.newY,a=this.satisfyThreshold(o,s)||r.forceStopped?this.pages.getPageByDirection(this.nearestPage(o,s),i.direction,n.direction):this.pages.currentPage;t.time=this.getEaseTime(t.newX-a.x,t.newY-a.y),t.newX=a.x,t.newY=a.y,t.easing=this.options.easing||ni.bounce},t.prototype.scrollHandler=function(t){var e=t.x,i=t.y;if(this.satisfyThreshold(e,i)){var n=this.nearestPage(e,i);this.pageWillChangeTo(n)}},t.prototype.pageWillChangeTo=function(t){var e,i,n=this.pages.getWillChangedPage(t);e=this.willChangeToPage,i=n,(e.pageX!==i.pageX||e.pageY!==i.pageY)&&(this.willChangeToPage=n,this.scroll.trigger(this.scroll.eventTypes.slideWillChange,this.willChangeToPage))},t.prototype.registerHooks=function(t,e,i){t.on(e,i,this),this.hooksFn.push([t,e,i])},t.prototype.destroy=function(){var t=this.scroll.scroller.content,e=this.options,i=e.loop,n=e.autoplay;i&&this.removeClonedSlidePage(t),n&&clearTimeout(this.autoplayTimer),this.hooksFn.forEach((function(t){var e=t[0],i=t[1],n=t[2];e.eventTypes[i]&&e.off(i,n)})),this.hooksFn.length=0},t.pluginName="slide",t}(),qi=[{key:"wheelTo",name:"wheelTo"},{key:"getSelectedIndex",name:"getSelectedIndex"},{key:"restorePosition",name:"restorePosition"}].map((function(t){return{key:t.key,sourceKey:"plugins.wheel."+t.name}})),Ui=4,Ki=function(){function t(t){this.scroll=t,this.init()}return t.prototype.init=function(){this.handleBScroll(),this.handleOptions(),this.handleHooks(),this.refreshBoundary(),this.setSelectedIndex(this.options.selectedIndex)},t.prototype.handleBScroll=function(){this.scroll.proxy(qi),this.scroll.registerType(["wheelIndexChanged"])},t.prototype.handleOptions=function(){var t=!0===this.scroll.options.wheel?{}:this.scroll.options.wheel;this.options=Ae({wheelWrapperClass:"wheel-scroll",wheelItemClass:"wheel-item",rotate:25,adjustTime:400,selectedIndex:0,wheelDisabledItemClass:"wheel-disabled-item"},t)},t.prototype.handleHooks=function(){var t=this,e=this.scroll,i=this.scroll.scroller,n=i.actionsHandler,r=i.scrollBehaviorX,o=i.scrollBehaviorY,s=i.animater,a=i.content;e.on(e.eventTypes.scrollEnd,(function(e){var n=t.findNearestValidWheel(e.y).index;if(i.animater.forceStopped&&!t.isAdjustingPosition)return t.target=t.items[n],!0;t.setSelectedIndex(n),t.isAdjustingPosition&&(t.isAdjustingPosition=!1)})),this.scroll.hooks.on(this.scroll.hooks.eventTypes.refresh,(function(e){e!==a&&(a=e,t.setSelectedIndex(t.options.selectedIndex,!0)),t.rotateX(t.scroll.y),t.wheelTo(t.selectedIndex,0)})),this.scroll.hooks.on(this.scroll.hooks.eventTypes.beforeInitialScrollTo,(function(e){e.x=0,e.y=-t.selectedIndex*t.itemHeight})),i.hooks.on(i.hooks.eventTypes.checkClick,(function(){var e,i=(e=t.items,Array.prototype.slice.call(e,0)).indexOf(t.target);return-1===i||t.wheelTo(i,t.options.adjustTime,ni.swipe),!0})),i.hooks.on(i.hooks.eventTypes.scrollTo,(function(e){e.y=t.findNearestValidWheel(e.y).y})),i.hooks.on(i.hooks.eventTypes.minDistanceScroll,(function(){var t=i.animater;!0===t.forceStopped&&(t.forceStopped=!1)})),i.hooks.on(i.hooks.eventTypes.scrollToElement,(function(e,i){if(!ii(e,t.options.wheelItemClass))return!0;i.top=t.findNearestValidWheel(i.top).y})),n.hooks.on(n.hooks.eventTypes.beforeStart,(function(e){t.target=e.target})),r.hooks.on(r.hooks.eventTypes.computeBoundary,(function(t){t.maxScrollPos=0,t.minScrollPos=0})),o.hooks.on(o.hooks.eventTypes.computeBoundary,(function(e){t.items=t.scroll.scroller.content.children,t.checkWheelAllDisabled(),t.itemHeight=t.items.length>0?o.contentSize/t.items.length:0,e.maxScrollPos=-t.itemHeight*(t.items.length-1),e.minScrollPos=0})),o.hooks.on(o.hooks.eventTypes.momentum,(function(e){e.rate=Ui,e.destination=t.findNearestValidWheel(e.destination).y})),o.hooks.on(o.hooks.eventTypes.end,(function(e){var i=t.findNearestValidWheel(o.currentPos);e.destination=i.y,e.duration=t.options.adjustTime})),s.hooks.on(s.hooks.eventTypes.time,(function(e){t.transitionDuration(e)})),s.hooks.on(s.hooks.eventTypes.timeFunction,(function(e){t.timeFunction(e)})),s.hooks.on(s.hooks.eventTypes.callStop,(function(){var e=t.findNearestValidWheel(t.scroll.y).index;t.isAdjustingPosition=!0,t.wheelTo(e,0)})),s.translater.hooks.on(s.translater.hooks.eventTypes.translate,(function(e){t.rotateX(e.y)}))},t.prototype.refreshBoundary=function(){var t=this.scroll.scroller,e=t.scrollBehaviorX,i=t.scrollBehaviorY,n=t.content;e.refresh(n),i.refresh(n)},t.prototype.setSelectedIndex=function(t,e){void 0===e&&(e=!1);var i=this.selectedIndex;this.selectedIndex=t,i===t||e||this.scroll.trigger("wheelIndexChanged",t)},t.prototype.getSelectedIndex=function(){return this.selectedIndex},t.prototype.wheelTo=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0);var n=-t*this.itemHeight;this.scroll.scrollTo(0,n,e,i)},t.prototype.restorePosition=function(){if(this.scroll.pending){var t=this.getSelectedIndex();this.scroll.scroller.animater.clearTimer(),this.wheelTo(t,0)}},t.prototype.transitionDuration=function(t){for(var e=0;e<this.items.length;e++)this.items[e].style[Ke.transitionDuration]=t+"ms"},t.prototype.timeFunction=function(t){for(var e=0;e<this.items.length;e++)this.items[e].style[Ke.transitionTimingFunction]=t},t.prototype.rotateX=function(t){for(var e=this.options.rotate,i=void 0===e?25:e,n=0;n<this.items.length;n++){var r=(i*(t/this.itemHeight+n)).toFixed(3);this.items[n].style[Ke.transform]="rotateX("+r+"deg)"}},t.prototype.findNearestValidWheel=function(t){t=t>0?0:t<this.scroll.maxScrollY?this.scroll.maxScrollY:t;for(var e=Math.abs(Math.round(-t/this.itemHeight)),i=e,n=this.items,r=this.options.wheelDisabledItemClass;e>=0&&ii(n[e],r);)e--;if(e<0)for(e=i;e<=n.length-1&&ii(n[e],r);)e++;return e===n.length&&(e=i),{index:this.wheelItemsAllDisabled?-1:e,y:-e*this.itemHeight}},t.prototype.checkWheelAllDisabled=function(){var t=this.options.wheelDisabledItemClass,e=this.items;this.wheelItemsAllDisabled=!0;for(var i=0;i<e.length;i++)if(!ii(e[i],t)){this.wheelItemsAllDisabled=!1;break}},t.pluginName="wheel",t}(),Zi=[{key:"zoomTo",name:"zoomTo"}].map((function(t){return{key:t.key,sourceKey:"plugins.zoom."+t.name}})),Qi=function(){function t(t){this.scroll=t,this.scale=1,this.prevScale=1,this.init()}return t.prototype.init=function(){this.handleBScroll(),this.handleOptions(),this.handleHooks(),this.tryInitialZoomTo(this.zoomOpt)},t.prototype.zoomTo=function(t,e,i,n){var r=this.resolveOrigin(e,i),o={x:r.originX,y:r.originY,baseScale:this.scale};this._doZoomTo(t,o,n,!0)},t.prototype.handleBScroll=function(){this.scroll.proxy(Zi),this.scroll.registerType(["beforeZoomStart","zoomStart","zooming","zoomEnd"])},t.prototype.handleOptions=function(){var t=!0===this.scroll.options.zoom?{}:this.scroll.options.zoom;this.zoomOpt=Ae({start:1,min:1,max:4,initialOrigin:[0,0],minimalZoomDistance:5,bounceTime:800},t)},t.prototype.handleHooks=function(){var t=this,e=this.scroll,i=this.scroll.scroller;this.wrapper=this.scroll.scroller.wrapper,this.setTransformOrigin(this.scroll.scroller.content);var n=i.scrollBehaviorX,r=i.scrollBehaviorY;this.hooksFn=[],this.registerHooks(e.hooks,e.hooks.eventTypes.contentChanged,(function(e){t.setTransformOrigin(e),t.scale=1,t.tryInitialZoomTo(t.zoomOpt)})),this.registerHooks(e.hooks,e.hooks.eventTypes.beforeInitialScrollTo,(function(){if(1!==t.zoomOpt.start)return!0})),this.registerHooks(n.hooks,n.hooks.eventTypes.beforeComputeBoundary,(function(){var e=Qe(t.scroll.scroller.content);n.contentSize=Math.floor(e.width*t.scale)})),this.registerHooks(r.hooks,r.hooks.eventTypes.beforeComputeBoundary,(function(){var e=Qe(t.scroll.scroller.content);r.contentSize=Math.floor(e.height*t.scale)})),this.registerHooks(i.actions.hooks,i.actions.hooks.eventTypes.start,(function(e){var i=e.touches&&e.touches.length||0;t.fingersOperation(i),2===i&&t.zoomStart(e)})),this.registerHooks(i.actions.hooks,i.actions.hooks.eventTypes.beforeMove,(function(e){var i=e.touches&&e.touches.length||0;if(t.fingersOperation(i),2===i)return t.zoom(e),!0})),this.registerHooks(i.actions.hooks,i.actions.hooks.eventTypes.beforeEnd,(function(e){if(2===t.fingersOperation())return t.zoomEnd(),!0})),this.registerHooks(i.translater.hooks,i.translater.hooks.eventTypes.beforeTranslate,(function(e,i){var n=i.scale?i.scale:t.prevScale;t.prevScale=n,e.push("scale("+n+")")})),this.registerHooks(i.hooks,i.hooks.eventTypes.scrollEnd,(function(){2===t.fingersOperation()&&t.scroll.trigger(t.scroll.eventTypes.zoomEnd,{scale:t.scale})})),this.registerHooks(this.scroll.hooks,"destroy",this.destroy)},t.prototype.setTransformOrigin=function(t){t.style[Ke.transformOrigin]="0 0"},t.prototype.tryInitialZoomTo=function(t){var e=t.start,i=t.initialOrigin,n=this.scroll.scroller,r=n.scrollBehaviorX,o=n.scrollBehaviorY;1!==e&&(this.resetBoundaries([r,o]),this.zoomTo(e,i[0],i[1],0))},t.prototype.fingersOperation=function(t){if("number"!=typeof t)return this.numberOfFingers;this.numberOfFingers=t},t.prototype._doZoomTo=function(t,e,i,n){var r=this;void 0===i&&(i=this.zoomOpt.bounceTime),void 0===n&&(n=!1);var o=this.zoomOpt,s=o.min,a=o.max,l=this.scale,c=Ye(t,s,a);!function(){if(0!==i){if(i>0){var t,e=Ee(),n=e+i,o=function(){var s=Ee();if(s>=n)return r.scroll.trigger(r.scroll.eventTypes.zooming,{scale:c}),void ai(t);var a=ni.bounce.fn((s-e)/i)*(c-l)+l;r.scroll.trigger(r.scroll.eventTypes.zooming,{scale:a}),t=si(o)};o()}}else r.scroll.trigger(r.scroll.eventTypes.zooming,{scale:c})}(),this.fingersOperation(2),this._zoomTo(c,l,e,i,n)},t.prototype._zoomTo=function(t,e,i,n,r){void 0===r&&(r=!1);var o=t/i.baseScale;this.setScale(t);var s=this.scroll.scroller,a=s.scrollBehaviorX,l=s.scrollBehaviorY;this.resetBoundaries([a,l]);var c=this.getNewPos(i.x,o,a,!0,r),h=this.getNewPos(i.y,o,l,!0,r);a.currentPos===Math.round(c)&&l.currentPos===Math.round(h)&&t===e||s.scrollTo(c,h,n,ni.bounce,{start:{scale:e},end:{scale:t}})},t.prototype.resolveOrigin=function(t,e){var i=this.scroll.scroller,n=i.scrollBehaviorX,r=i.scrollBehaviorY,o={left:function(){return 0},top:function(){return 0},right:function(){return n.contentSize},bottom:function(){return r.contentSize},center:function(t){return(0===t?n.contentSize:r.contentSize)/2}};return{originX:"number"==typeof t?t:o[t](0),originY:"number"==typeof e?e:o[e](1)}},t.prototype.zoomStart=function(t){var e=t.touches[0],i=t.touches[1];this.startDistance=this.getFingerDistance(t),this.startScale=this.scale;var n,r,o=(n=this.wrapper,{left:-((r=n.getBoundingClientRect()).left+window.pageXOffset),top:-(r.top+window.pageYOffset)}),s=o.left,a=o.top;this.origin={x:Math.abs(e.pageX+i.pageX)/2+s-this.scroll.x,y:Math.abs(e.pageY+i.pageY)/2+a-this.scroll.y,baseScale:this.startScale},this.scroll.trigger(this.scroll.eventTypes.beforeZoomStart)},t.prototype.zoom=function(t){var e=this.getFingerDistance(t);if(this.zoomed||!(Math.abs(e-this.startDistance)<this.zoomOpt.minimalZoomDistance)){var i=this.dampingScale(e/this.startDistance*this.startScale),n=i/this.startScale;this.setScale(i),this.zoomed||(this.zoomed=!0,this.scroll.trigger(this.scroll.eventTypes.zoomStart));var r=this.scroll.scroller,o=r.scrollBehaviorX,s=r.scrollBehaviorY,a=this.getNewPos(this.origin.x,n,o,!1,!1),l=this.getNewPos(this.origin.y,n,s,!1,!1);this.scroll.trigger(this.scroll.eventTypes.zooming,{scale:this.scale}),r.translater.translate({x:a,y:l,scale:i})}},t.prototype.zoomEnd=function(){this.zoomed&&(this.shouldRebound()?this._doZoomTo(this.scale,this.origin,this.zoomOpt.bounceTime):this.scroll.trigger(this.scroll.eventTypes.zoomEnd,{scale:this.scale}))},t.prototype.getFingerDistance=function(t){var e,i,n=t.touches[0],r=t.touches[1],o=Math.abs(n.pageX-r.pageX),s=Math.abs(n.pageY-r.pageY);return e=o,i=s,Math.sqrt(e*e+i*i)},t.prototype.shouldRebound=function(){var t=this.zoomOpt,e=t.min,i=t.max,n=this.scale;if(n!==Ye(n,e,i))return!0;var r=this.scroll.scroller,o=r.scrollBehaviorX,s=r.scrollBehaviorY;this.resetBoundaries([o,s]);var a=o.checkInBoundary().inBoundary,l=o.checkInBoundary().inBoundary;return!(a&&l)},t.prototype.dampingScale=function(t){var e=this.zoomOpt,i=e.min,n=e.max;return t<i?t=.5*i*Math.pow(2,t/i):t>n&&(t=2*n*Math.pow(.5,n/t)),t},t.prototype.setScale=function(t){this.scale=t},t.prototype.resetBoundaries=function(t){t.forEach((function(t){return t.computeBoundary()}))},t.prototype.getNewPos=function(t,e,i,n,r){void 0===r&&(r=!1);var o=t-t*e+(r?i.currentPos:i.startPos);return n&&(o=Ye(o,i.maxScrollPos,i.minScrollPos)),o>0?Math.floor(o):Math.ceil(o)},t.prototype.registerHooks=function(t,e,i){t.on(e,i,this),this.hooksFn.push([t,e,i])},t.prototype.destroy=function(){this.hooksFn.forEach((function(t){var e=t[0],i=t[1],n=t[2];e.off(i,n)})),this.hooksFn.length=0},t.pluginName="zoom",t}(),Ji=function(){function t(t){this.ancestors=[],this.descendants=[],this.hooksManager=[],this.analyzed=!1,this.selfScroll=t}return t.create=function(e){return new t(e)},t.prototype.hasAncestors=function(t){return ze(this.ancestors,(function(e){return e[0]===t}))>-1},t.prototype.hasDescendants=function(t){return ze(this.descendants,(function(e){return e[0]===t}))>-1},t.prototype.addAncestor=function(t,e){var i=this.ancestors;i.push([t,e]),i.sort((function(t,e){return t[1]-e[1]}))},t.prototype.addDescendant=function(t,e){var i=this.descendants;i.push([t,e]),i.sort((function(t,e){return t[1]-e[1]}))},t.prototype.removeAncestor=function(t){var e=this.ancestors;if(e.length){var i=ze(this.ancestors,(function(e){return e[0]===t}));if(i>-1)return e.splice(i,1)}},t.prototype.removeDescendant=function(t){var e=this.descendants;if(e.length){var i=ze(this.descendants,(function(e){return e[0]===t}));if(i>-1)return e.splice(i,1)}},t.prototype.registerHooks=function(t,e,i){t.on(e,i),this.hooksManager.push([t,e,i])},t.prototype.setAnalyzed=function(t){void 0===t&&(t=!1),this.analyzed=t},t.prototype.purge=function(){var t=this;this.ancestors.forEach((function(e){e[0].removeDescendant(t)})),this.descendants.forEach((function(e){e[0].removeAncestor(t)})),this.hooksManager.forEach((function(t){var e=t[0],i=t[1],n=t[2];e.off(i,n)})),this.hooksManager=[]},t}(),tn=[{key:"purgeNestedScroll",name:"purgeNestedScroll"}].map((function(t){return{key:t.key,sourceKey:"plugins.nestedScroll."+t.name}})),en=function(t){t.forEach((function(t){t.enable()}))},nn=function(t,e){t.forEach((function(t){t.hasHorizontalScroll!==e.hasHorizontalScroll&&t.hasVerticalScroll!==e.hasVerticalScroll||t.disable()}))},rn=function(t,e){for(var i=0,n=t.parentNode;n&&n!==e;)i++,n=n.parentNode;return i},on=function(){function t(e){var i=this.handleOptions(e),n=t.instancesMap[i];return n||((n=t.instancesMap[i]=this).store=[],n.hooksFn=[]),n.init(e),n}return t.getAllNestedScrolls=function(){var e=t.instancesMap;return Object.keys(e).map((function(t){return e[t]}))},t.purgeAllNestedScrolls=function(){t.getAllNestedScrolls().forEach((function(t){return t.purgeNestedScroll()}))},t.prototype.handleOptions=function(t){var e=!0===t.options.nestedScroll?{}:t.options.nestedScroll,i={groupId:"INTERNAL_NESTED_SCROLL"};this.options=Ae(i,e);var n=typeof this.options.groupId;return"string"!==n&&"number"!==n&&ke("groupId must be string or number for NestedScroll plugin"),this.options.groupId},t.prototype.init=function(t){t.proxy(tn),this.addBScroll(t),this.buildBScrollGraph(),this.analyzeBScrollGraph(),this.ensureEventInvokeSequence(),this.handleHooks(t)},t.prototype.handleHooks=function(t){var e=this;this.registerHooks(t.hooks,t.hooks.eventTypes.destroy,(function(){e.deleteScroll(t)}))},t.prototype.deleteScroll=function(t){t.wrapper.isBScrollContainer=void 0;var e=this.store,i=this.hooksFn,n=ze(e,(function(e){return e.selfScroll===t}));n>-1&&(e[n].purge(),e.splice(n,1));var r=ze(i,(function(e){return e[0]===t.hooks}));if(r>-1){var o=i[r],s=o[0],a=o[1],l=o[2];s.off(a,l),i.splice(r,1)}},t.prototype.addBScroll=function(t){this.store.push(Ji.create(t))},t.prototype.buildBScrollGraph=function(){for(var t,e,i,n,r=this.store,o=this.store.length,s=0;s<o;s++){i=(t=r[s]).selfScroll.wrapper;for(var a=0;a<o;a++)if(n=(e=r[a]).selfScroll.wrapper,t!==e&&i.contains(n)){var l=rn(n,i);t.hasDescendants(e)||t.addDescendant(e,l),e.hasAncestors(t)||e.addAncestor(t,l)}}},t.prototype.analyzeBScrollGraph=function(){this.store.forEach((function(t){if(!t.analyzed){var e=t.ancestors,i=t.descendants,n=t.selfScroll;t.registerHooks(n,n.eventTypes.beforeScrollStart,(function(){var t,r,o,s,a,l,c,h,u,f,p=e.map((function(t){return t[0].selfScroll})),d=i.map((function(t){return t[0].selfScroll}));Se(p,d).forEach((function(t){t.pending&&(t.stop(),t.resetPosition())})),r=(t=n).hasHorizontalScroll,o=t.hasVerticalScroll,s=t.x,a=t.y,l=t.minScrollX,c=t.maxScrollX,h=t.minScrollY,u=t.maxScrollY,f=!1,o?f=a>h||a<u:r&&(f=s>l||s<c),f&&function(t){t.scroller.reflow(),t.resetPosition(0)}(n),function(t){t.forEach((function(t){var e=t.scroller,i=e.actions,n=e.scrollBehaviorX,r=e.scrollBehaviorY;i.fingerMoved=!0,i.contentMoved=!1,i.directionLockAction.reset(),n.start(),r.start(),n.resetStartPos(),r.resetStartPos(),i.startTime=+new Date}))}(p),nn(p,n)})),t.registerHooks(n,n.eventTypes.touchEnd,(function(){var t=e.map((function(t){return t[0].selfScroll})),n=i.map((function(t){return t[0].selfScroll}));en(Se(t,n))}));var r=n.scroller.actions.hooks;t.registerHooks(r,r.eventTypes.detectMovingDirection,(function(){var t,i,r,o,s,a,l,c,h,u,f,p,d=e.map((function(t){return t[0].selfScroll})),g=d[0],v=d.slice(1),m=n.scroller.actions.contentMoved,y=0===d.length;if(m)nn(d,n);else if(!y&&(i=(t=n).hasHorizontalScroll,r=t.hasVerticalScroll,o=t.x,s=t.y,a=t.minScrollX,l=t.maxScrollX,c=t.minScrollY,h=t.maxScrollY,u=t.movingDirectionX,f=t.movingDirectionY,p=!1,r?p=s>=c&&-1===f||s<=h&&1===f:i&&(p=o>=a&&-1===u||o<=l&&1===u),p))return nn([n],n),g&&en([g]),nn(v,n),!0})),t.setAnalyzed(!0)}}))},t.prototype.ensureEventInvokeSequence=function(){this.store.slice().sort((function(t,e){return t.descendants.length-e.descendants.length})).forEach((function(t){t.selfScroll.scroller.actionsHandler.rebindDOMEvents()}))},t.prototype.registerHooks=function(t,e,i){t.on(e,i,this),this.hooksFn.push([t,e,i])},t.prototype.purgeNestedScroll=function(){var e=this.options.groupId;this.store.forEach((function(t){t.purge()})),this.store=[],this.hooksFn.forEach((function(t){var e=t[0],i=t[1],n=t[2];e.off(i,n)})),this.hooksFn=[],delete t.instancesMap[e]},t.pluginName="nestedScroll",t.instancesMap={},t}(),sn=function(){function t(t,e){this.wrapperHeight=t,this.tombstoneHeight=e,this.lastDirection=1,this.lastPos=0}return t.prototype.calculate=function(t,e){var i=t-this.lastPos;this.lastPos=t;var n=this.getDirection(i),r=this.calculateIndex(0,t,e),o=this.calculateIndex(r,t+this.wrapperHeight,e);return 1===n?(r-=10,o+=30):(r-=30,o+=10),r<0&&(r=0),{start:r,end:o}},t.prototype.getDirection=function(t){var e;if(t>0)e=1;else{if(!(t<0))return this.lastDirection;e=0}return this.lastDirection=e,e},t.prototype.calculateIndex=function(t,e,i){if(e<=0)return t;for(var n=t,r=i[n]&&-1!==i[n].pos?i[n].pos:0,o=0;n<i.length&&i[n].pos<e;)r=i[n].pos,n++;return n===i.length&&(o=Math.floor((e-r)/this.tombstoneHeight)),n+=o},t.prototype.resetState=function(){this.lastDirection=1,this.lastPos=0},t}(),an=function(){this.data=null,this.dom=null,this.tombstone=null,this.width=0,this.height=0,this.pos=0},ln=function(){function t(t,e,i){this.fetchFn=e,this.onFetchFinish=i,this.loadedNum=0,this.fetching=!1,this.hasMore=!0,this.list=t||[]}return t.prototype.update=function(t){return xe(this,void 0,void 0,(function(){var e;return be(this,(function(i){return this.hasMore||(t=Math.min(t,this.list.length)),t>this.list.length&&(e=t-this.list.length,this.addEmptyData(e)),[2,this.checkToFetch(t)]}))}))},t.prototype.add=function(t){for(var e=0;e<t.length;e++)this.list[this.loadedNum]?this.list[this.loadedNum]=ye(ye({},this.list[this.loadedNum]),{data:t[e]}):this.list[this.loadedNum]={data:t[e]},this.loadedNum++;return this.list},t.prototype.addEmptyData=function(t){for(var e=0;e<t;e++)this.list.push(new an);return this.list},t.prototype.fetch=function(t){return xe(this,void 0,void 0,(function(){var e;return be(this,(function(i){switch(i.label){case 0:return this.fetching?[2,[]]:(this.fetching=!0,[4,this.fetchFn(t)]);case 1:return e=i.sent(),this.fetching=!1,[2,e]}}))}))},t.prototype.checkToFetch=function(t){return xe(this,void 0,void 0,(function(){var e,i,n;return be(this,(function(r){switch(r.label){case 0:return this.hasMore?t<=this.loadedNum?[2]:(e=t-this.loadedNum,[4,this.fetch(e)]):[2];case 1:return(i=r.sent())instanceof Array&&i.length?(this.add(i),n=this.onFetchFinish(this.list,!0),[2,this.checkToFetch(n)]):("boolean"==typeof i&&!1===i&&(this.hasMore=!1,this.list.splice(this.loadedNum),this.onFetchFinish(this.list,!1)),[2])}}))}))},t.prototype.getList=function(){return this.list},t.prototype.resetState=function(){this.loadedNum=0,this.fetching=!1,this.hasMore=!0,this.list=[]},t}(),cn=function(){function t(t){this.create=t,this.cached=[],this.width=0,this.height=0,this.initialed=!1,this.getSize()}return t.isTombstone=function(t){return!(!t||!t.classList)&&t.classList.contains("tombstone")},t.prototype.getSize=function(){if(!this.initialed){var t=this.create();t.style.position="absolute",document.body.appendChild(t),t.style.display="",this.height=t.offsetHeight,this.width=t.offsetWidth,document.body.removeChild(t),this.cached.push(t)}},t.prototype.getOne=function(){var t=this.cached.pop();if(t){var e=t.style;return e.display="",e.opacity="1",e[Ke.transform]="",e[Ke.transition]="",t}return this.create()},t.prototype.recycle=function(t){for(var e=0,i=t;e<i.length;e++){var n=i[e];n.style.display="none",this.cached.push(n)}return this.cached},t.prototype.recycleOne=function(t){return this.cached.push(t),this.cached},t}(),hn=function(){function t(t,e,i){this.renderFn=e,this.tombstone=i,this.unusedDom=[],this.timers=[],this.setContent(t)}return t.prototype.update=function(t,e,i){e>=t.length&&(e=t.length-1),i>t.length&&(i=t.length),this.collectUnusedDom(t,e,i),this.createDom(t,e,i),this.cacheHeight(t,e,i);var n=this.positionDom(t,e,i);return{start:e,startPos:n.startPos,startDelta:n.startDelta,end:i,endPos:n.endPos}},t.prototype.collectUnusedDom=function(t,e,i){for(var n=0;n<t.length;n++)if(n!==e){if(t[n].dom){var r=t[n].dom;cn.isTombstone(r)?(this.tombstone.recycleOne(r),r.style.display="none"):this.unusedDom.push(r),t[n].dom=null}}else n=i-1;return t},t.prototype.createDom=function(t,e,i){for(var n=e;n<i;n++){var r=t[n].dom,o=t[n].data;if(r){if(!cn.isTombstone(r)||!o)continue;t[n].tombstone=r,t[n].dom=null}(r=o?this.renderFn(o,this.unusedDom.pop()):this.tombstone.getOne()).style.position="absolute",t[n].dom=r,t[n].pos=-1,this.content.appendChild(r)}},t.prototype.cacheHeight=function(t,e,i){for(var n=e;n<i;n++)t[n].data&&!t[n].height&&(t[n].height=t[n].dom.offsetHeight)},t.prototype.positionDom=function(t,e,i){for(var n=this,r=[],o=this.getStartPos(t,e,i),s=o.start,a=o.delta,l=s,c=e;c<i;c++){var h=t[c].tombstone;if(h){var u=h.style;u[Ke.transition]=$e+"transform 200ms, opacity 200ms",u[Ke.transform]="translateY("+l+"px)",u.opacity="0",t[c].tombstone=null,r.push(h)}t[c].dom&&t[c].pos!==l&&(t[c].dom.style[Ke.transform]="translateY("+l+"px)",t[c].pos=l),l+=t[c].height||this.tombstone.height}var f=window.setTimeout((function(){n.tombstone.recycle(r)}),200);return this.timers.push(f),{startPos:s,startDelta:a,endPos:l}},t.prototype.getStartPos=function(t,e,i){if(t[e]&&-1!==t[e].pos)return{start:t[e].pos,delta:0};for(var n=-1===t[0].pos?0:t[0].pos,r=0;r<e;r++)n+=t[r].height||this.tombstone.height;var o,s=n;for(o=e;o<i;o++)if(!cn.isTombstone(t[o].dom)&&-1!==t[o].pos){n=t[o].pos;break}var a=o;if(a<i)for(;a>e;)n-=t[a-1].height,a--;return{start:n,delta:s-n}},t.prototype.removeTombstone=function(){for(var t=this.content.querySelectorAll(".tombstone"),e=t.length-1;e>=0;e--)this.content.removeChild(t[e])},t.prototype.setContent=function(t){t!==this.content&&(this.content=t)},t.prototype.destroy=function(){this.removeTombstone(),this.timers.forEach((function(t){clearTimeout(t)}))},t.prototype.resetState=function(){this.destroy(),this.timers=[],this.unusedDom=[]},t}(),un=function(){function t(t){this.scroll=t,this.start=0,this.end=0,this.init()}return t.prototype.init=function(){var t=this;this.handleOptions();var e=this.options,i=e.fetch,n=e.render,r=e.createTombstone;this.tombstone=new cn(r),this.indexCalculator=new sn(this.scroll.scroller.scrollBehaviorY.wrapperSize,this.tombstone.height),this.domManager=new hn(this.scroll.scroller.content,n,this.tombstone),this.dataManager=new ln([],i,this.onFetchFinish.bind(this)),this.scroll.on(this.scroll.eventTypes.destroy,this.destroy,this),this.scroll.on(this.scroll.eventTypes.scroll,this.update,this),this.scroll.on(this.scroll.eventTypes.contentChanged,(function(e){t.domManager.setContent(e),t.indexCalculator.resetState(),t.domManager.resetState(),t.dataManager.resetState(),t.update({y:0})}));var o=this.scroll.scroller.scrollBehaviorY;o.hooks.on(o.hooks.eventTypes.computeBoundary,this.modifyBoundary,this),this.update({y:0})},t.prototype.modifyBoundary=function(t){t.maxScrollPos=-2e3},t.prototype.handleOptions=function(){var t=this.scroll.options.infinity;t&&("function"!=typeof t.fetch&&ke("Infinity plugin need fetch Function to new data."),"function"!=typeof t.render&&ke("Infinity plugin need render Function to render each item."),"function"!=typeof t.render&&ke("Infinity plugin need createTombstone Function to create tombstone."),this.options=t),this.scroll.options.probeType=3},t.prototype.update=function(t){var e=Math.round(-t.y),i=this.indexCalculator.calculate(e,this.dataManager.getList()),n=i.start,r=i.end;this.start=n,this.end=r,this.dataManager.update(r),this.updateDom(this.dataManager.getList())},t.prototype.onFetchFinish=function(t,e){var i=this.updateDom(t).end;return e||(this.domManager.removeTombstone(),this.scroll.scroller.animater.stop(),this.scroll.resetPosition()),i},t.prototype.updateDom=function(t){var e=this.domManager.update(t,this.start,this.end),i=e.end,n=e.startPos,r=e.endPos,o=e.startDelta;return o&&(this.scroll.minScrollY=o),r>this.scroll.maxScrollY&&(this.scroll.maxScrollY=-(r-this.scroll.scroller.scrollBehaviorY.wrapperSize)),{end:i,startPos:n,endPos:r}},t.prototype.destroy=function(){for(var t=this.scroll.scroller,e=t.content,i=t.scrollBehaviorY;e.firstChild;)e.removeChild(e.firstChild);this.domManager.destroy(),this.scroll.off("scroll",this.update),this.scroll.off("destroy",this.destroy),i.hooks.off(i.hooks.eventTypes.computeBoundary)},t.pluginName="infinity",t}(),fn=[{key:"putAt",name:"putAt"}].map((function(t){return{key:t.key,sourceKey:"plugins.movable."+t.name}})),pn=function(){function t(t){this.scroll=t,this.handleBScroll(),this.handleHooks()}return t.prototype.handleBScroll=function(){this.scroll.proxy(fn)},t.prototype.handleHooks=function(){var t=this;this.hooksFn=[];var e=this.scroll.scroller,i=e.scrollBehaviorX,n=e.scrollBehaviorY,r=function(t,e){t.maxScrollPos>0&&(t.minScrollPos=e.wrapperSize-e.contentSize,t.maxScrollPos=0)};this.registerHooks(i.hooks,i.hooks.eventTypes.ignoreHasScroll,(function(){return!0})),this.registerHooks(i.hooks,i.hooks.eventTypes.computeBoundary,(function(t){r(t,i)})),this.registerHooks(n.hooks,n.hooks.eventTypes.ignoreHasScroll,(function(){return!0})),this.registerHooks(n.hooks,n.hooks.eventTypes.computeBoundary,(function(t){r(t,n)})),this.registerHooks(this.scroll.hooks,this.scroll.hooks.eventTypes.destroy,(function(){t.destroy()}))},t.prototype.putAt=function(t,e,i,n){void 0===i&&(i=this.scroll.options.bounceTime),void 0===n&&(n=ni.bounce);var r=this.resolvePostion(t,e);this.scroll.scrollTo(r.x,r.y,i,n)},t.prototype.resolvePostion=function(t,e){var i=this.scroll.scroller,n=i.scrollBehaviorX,r=i.scrollBehaviorY,o={left:function(){return 0},top:function(){return 0},right:function(){return n.minScrollPos},bottom:function(){return r.minScrollPos},center:function(t){return(0===t?n.minScrollPos:r.minScrollPos)/2}};return{x:"number"==typeof t?t:o[t](0),y:"number"==typeof e?e:o[e](1)}},t.prototype.destroy=function(){this.hooksFn.forEach((function(t){var e=t[0],i=t[1],n=t[2];e.off(i,n)})),this.hooksFn.length=0},t.prototype.registerHooks=function(t,e,i){t.on(e,i,this),this.hooksFn.push([t,e,i])},t.pluginName="movable",t.applyOrder="pre",t}(),dn=function(){function t(t){this.scroll=t,this.refreshTimer=0,this.init()}return t.prototype.init=function(){this.handleOptions(this.scroll.options.observeImage),this.bindEventsToWrapper()},t.prototype.handleOptions=function(t){void 0===t&&(t={}),t=!0===t?{}:t;this.options=Ae({debounceTime:100},t)},t.prototype.bindEventsToWrapper=function(){var t=this.scroll.scroller.wrapper;this.imageLoadEventRegister=new ui(t,[{name:"load",handler:this.load.bind(this),capture:!0}]),this.imageErrorEventRegister=new ui(t,[{name:"error",handler:this.load.bind(this),capture:!0}])},t.prototype.load=function(t){var e=this,i=t.target,n=this.options.debounceTime;i&&"img"===i.tagName.toLowerCase()&&(0===n?this.scroll.refresh():(clearTimeout(this.refreshTimer),this.refreshTimer=window.setTimeout((function(){e.scroll.refresh()}),this.options.debounceTime)))},t.pluginName="observeImage",t}(),gn=function(t){t.preventDefault(),t.stopPropagation()},vn=function(){function t(t,e){this.scroll=t,this.options=e,this.currentPos={x:0,y:0},this.hooksFn=[],this.handleDOM(),this.handleHooks(),this.handleInteractive()}return t.prototype.handleDOM=function(){var t=this.options,e=t.relationElement,i=t.relationElementHandleElementIndex,n=void 0===i?0:i;this.wrapper=e,this.indicatorEl=this.wrapper.children[n]},t.prototype.handleHooks=function(){var t=this,e=this.scroll,i=e.hooks,n=e.scroller.translater.hooks,r=e.scroller.animater.hooks;this.registerHooks(i,i.eventTypes.refresh,this.refresh),this.registerHooks(n,n.eventTypes.translate,(function(e){t.updatePosition(e)})),this.registerHooks(r,r.eventTypes.time,this.transitionTime),this.registerHooks(r,r.eventTypes.timeFunction,this.transitionTimingFunction)},t.prototype.transitionTime=function(t){void 0===t&&(t=0),this.indicatorEl.style[Ke.transitionDuration]=t+"ms"},t.prototype.transitionTimingFunction=function(t){this.indicatorEl.style[Ke.transitionTimingFunction]=t},t.prototype.handleInteractive=function(){!1!==this.options.interactive&&this.registerEvents()},t.prototype.registerHooks=function(t,e,i){t.on(e,i,this),this.hooksFn.push([t,e,i])},t.prototype.registerEvents=function(){var t=this.scroll.options,e=t.disableMouse,i=t.disableTouch,n=[],r=[],o=[];e||(n.push({name:"mousedown",handler:this.start.bind(this)}),r.push({name:"mousemove",handler:this.move.bind(this)}),o.push({name:"mouseup",handler:this.end.bind(this)})),i||(n.push({name:"touchstart",handler:this.start.bind(this)}),r.push({name:"touchmove",handler:this.move.bind(this)}),o.push({name:"touchend",handler:this.end.bind(this)},{name:"touchcancel",handler:this.end.bind(this)})),this.startEventRegister=new ui(this.indicatorEl,n),this.moveEventRegister=new ui(window,r),this.endEventRegister=new ui(window,o)},t.prototype.refresh=function(){var t,e,i,n=this.scroll,r=n.x,o=n.y,s=n.hasHorizontalScroll,a=n.hasVerticalScroll,l=n.maxScrollX,c=n.maxScrollY,h=(t=this.options.ratio,e={ratioX:0,ratioY:0},t?("number"==typeof t?e.ratioX=e.ratioY=t:"object"==typeof t&&t&&(e.ratioX=t.x||0,e.ratioY=t.y||0),e):e),u=h.ratioX,f=h.ratioY,p={width:(i=this.wrapper).clientWidth,height:i.clientHeight},d=p.width,g=p.height,v=Qe(this.indicatorEl),m=v.width,y=v.height;s&&(this.maxScrollX=d-m,this.translateXSign=this.maxScrollX>0?-1:1,this.minScrollX=0,this.ratioX=u||Math.abs(this.maxScrollX/l)),a&&(this.maxScrollY=g-y,this.translateYSign=this.maxScrollY>0?-1:1,this.minScrollY=0,this.ratioY=f||Math.abs(this.maxScrollY/c)),this.updatePosition({x:r,y:o})},t.prototype.start=function(t){if(!this.BScrollIsDisabled()){var e=t.touches?t.touches[0]:t;gn(t),this.initiated=!0,this.moved=!1,this.lastPointX=e.pageX,this.lastPointY=e.pageY,this.startTime=Ee(),this.scroll.scroller.hooks.trigger(this.scroll.scroller.hooks.eventTypes.beforeScrollStart)}},t.prototype.BScrollIsDisabled=function(){return!this.scroll.enabled},t.prototype.move=function(t){if(this.initiated){var e=t.touches?t.touches[0]:t,i=e.pageX,n=e.pageY;gn(t);var r=i-this.lastPointX,o=n-this.lastPointY;if(this.lastPointX=i,this.lastPointY=n,this.moved||this.indicatorNotMoved(r,o)||(this.moved=!0,this.scroll.scroller.hooks.trigger(this.scroll.scroller.hooks.eventTypes.scrollStart)),this.moved){var s=this.getBScrollPosByRatio(this.currentPos,r,o);this.syncBScroll(s)}}},t.prototype.end=function(t){if(this.initiated&&(this.initiated=!1,gn(t),this.moved)){var e=this.scroll,i=e.x,n=e.y;this.scroll.scroller.hooks.trigger(this.scroll.scroller.hooks.eventTypes.scrollEnd,{x:i,y:n})}},t.prototype.getBScrollPosByRatio=function(t,e,i){var n=t.x,r=t.y,o=this.scroll,s=o.hasHorizontalScroll,a=o.hasVerticalScroll,l=o.minScrollX,c=o.maxScrollX,h=o.minScrollY,u=o.maxScrollY,f=this.scroll,p=f.x,d=f.y;if(s){var g=Ye(n+e,Math.min(this.minScrollX,this.maxScrollX),Math.max(this.minScrollX,this.maxScrollX));p=Ye(Math.round(g/this.ratioX*this.translateXSign),c,l)}if(a){var v=Ye(r+i,Math.min(this.minScrollY,this.maxScrollY),Math.max(this.minScrollY,this.maxScrollY));d=Ye(Math.round(v/this.ratioY*this.translateYSign),u,h)}return{x:p,y:d}},t.prototype.indicatorNotMoved=function(t,e){var i=this.currentPos,n=i.x,r=i.y,o=n===this.minScrollX&&t<=0||n===this.maxScrollX&&t>=0,s=r===this.minScrollY&&e<=0||r===this.maxScrollY&&e>=0;return o&&s},t.prototype.syncBScroll=function(t){var e=Ee(),i=this.scroll,n=i.options,r=i.scroller,o=n.probeType,s=n.momentumLimitTime;r.translater.translate(t),e-this.startTime>s&&(this.startTime=e,1===o&&r.hooks.trigger(r.hooks.eventTypes.scroll,t)),o>1&&r.hooks.trigger(r.hooks.eventTypes.scroll,t)},t.prototype.updatePosition=function(t){var e=this.getIndicatorPosByRatio(t);this.applyTransformProperty(e),this.currentPos=ye({},e)},t.prototype.applyTransformProperty=function(t){var e=this.scroll.options.translateZ,i=["translateX("+t.x+"px)","translateY("+t.y+"px)",""+e];this.indicatorEl.style[Ke.transform]=i.join(" ")},t.prototype.getIndicatorPosByRatio=function(t){var e=t.x,i=t.y,n=this.scroll,r=n.hasHorizontalScroll,o=n.hasVerticalScroll,s=ye({},this.currentPos);if(r){var a=Math.round(this.ratioX*e*this.translateXSign);s.x=Ye(a,Math.min(this.minScrollX,this.maxScrollX),Math.max(this.minScrollX,this.maxScrollX))}if(o){var l=Math.round(this.ratioY*i*this.translateYSign);s.y=Ye(l,Math.min(this.minScrollY,this.maxScrollY),Math.max(this.minScrollY,this.maxScrollY))}return s},t.prototype.destroy=function(){!1!==this.options.interactive&&(this.startEventRegister.destroy(),this.moveEventRegister.destroy(),this.endEventRegister.destroy()),this.hooksFn.forEach((function(t){var e=t[0],i=t[1],n=t[2];e.off(i,n)})),this.hooksFn.length=0},t}(),mn=function(){function t(t){this.scroll=t,this.options=[],this.indicators=[],this.handleOptions(),this.handleHooks()}return t.prototype.handleOptions=function(){var t=this.scroll.options.indicators;Ce(Array.isArray(t),"'indicators' must be an array.");for(var e=0,i=t;e<i.length;e++){var n=i[e];Ce(!!n.relationElement,"'relationElement' must be a HTMLElement."),this.createIndicators(n)}},t.prototype.createIndicators=function(t){this.indicators.push(new vn(this.scroll,t))},t.prototype.handleHooks=function(){var t=this,e=this.scroll.hooks;e.on(e.eventTypes.destroy,(function(){for(var e=0,i=t.indicators;e<i.length;e++){i[e].destroy()}t.indicators=[]}))},t.pluginName="indicators",t}();Ai.use(Bi).use(Yi).use(Ni).use(Li).use(ji).use(Vi).use(Ki).use(Qi).use(on).use(un).use(pn).use(dn).use(mn);var yn=Ai,xn={name:C.Create("scroll-view").name,props:{probeType:{type:Number,default:1},click:{type:Boolean,default:!0},scrollbar:{type:Boolean,default:!1},scrollX:{type:Boolean,default:!1},listenScroll:{type:Boolean,default:!1},data:{type:Array,default:null},pullup:{type:Boolean,default:!1},pulldown:{type:Boolean,default:!1},beforeScroll:{type:Boolean,default:!1},refreshDelay:{type:Number,default:20}},mounted:function(){var t=this;setTimeout((function(){t._initScroll()}),20)},methods:{_initScroll:function(){var t=this;this.scroll=new yn(this.$refs.wrapper,{probeType:this.probeType,click:this.click,scrollbar:this.scrollbar,scrollX:this.scrollX}),this.listenScroll&&this.scroll.on("scroll",(function(e){t.$emit("scroll",e)})),this.pullup&&this.scroll.on("scrollEnd",(function(){t.scroll.y<=t.scroll.maxScrollY+50&&(console.log("pullup"),t.$emit("scrollToEnd"))})),this.pulldown&&this.scroll.on("touchEnd",(function(e){e.y>50&&(console.log("pulldown"),t.$emit("pulldown"))})),this.beforeScroll&&this.scroll.on("beforeScrollStart",(function(){t.$emit("beforeScroll")}))},disable:function(){this.scroll&&this.scroll.disable()},enable:function(){this.scroll&&this.scroll.enable()},refresh:function(){this.scroll&&this.scroll.refresh()},scrollTo:function(){this.scroll&&this.scroll.scrollTo.apply(this.scroll,arguments)},scrollToElement:function(){this.scroll&&this.scroll.scrollToElement.apply(this.scroll,arguments)}},watch:{data:function(){var t=this;setTimeout((function(){t.refresh()}),this.refreshDelay)}},render:function(){var t=arguments[0];return t("div",{ref:"wrapper"},[this.$slots.default])}};i(25);k.WithInstall(xn);var bn=xn,Sn=function t(){y()(this,t)};r()(Sn,"NONE",""),r()(Sn,"HOR","horizental"),r()(Sn,"VER","vertical");var wn=function(){function t(){y()(this,t),this.startX=0,this.startY=0,this.deltaX=0,this.deltaY=0,this.direction=Sn.NONE}return b()(t,[{key:"offsetX",get:function(){return Math.abs(this.deltaX)}},{key:"offsetY",get:function(){return Math.abs(this.deltaY)}},{key:"isHorizental",get:function(){return this.direction===Sn.HOR}},{key:"isVertical",get:function(){return this.direction===Sn.VER}},{key:"isUndetermined",get:function(){return this.direction===Sn.NONE}},{key:"resolveDirection",value:function(e,i){return e>i&&e>t.MIN_DISTANCE?Sn.HOR:i>e&&i>t.MIN_DISTANCE?Sn.VER:Sn.NONE}},{key:"reset",value:function(){this.startX=0,this.startY=0,this.deltaX=0,this.deltaY=0,this.direction=Sn.NONE}},{key:"getTouchByEvent",value:function(t){return t.clientX?t:t.touches[0]}},{key:"start",value:function(t){var e=this.getTouchByEvent(t);this.reset(),this.startX=e.clientX,this.startY=e.clientY}},{key:"move",value:function(t){var e=this.getTouchByEvent(t);this.deltaX=e.clientX-this.startX,this.deltaY=e.clientY-this.startY,this.isUndetermined&&(this.direction=this.resolveDirection(this.offsetX,this.offsetY))}}],[{key:"IsTouchable",get:function(){return"ontouchstart"in window}},{key:"Create",value:function(){return new t}}]),t}();r()(wn,"MIN_DISTANCE",10);var kn=function(){function t(){y()(this,t),this.startTime=0,this.startOffset=0,this.endTime=0,this.endOffset=0}return b()(t,[{key:"shouldActive",get:function(){return Math.abs(this.interval)<t.LIMIT_TIME&&Math.abs(this.distance)>t.LIMIT_DISTANCE}},{key:"interval",get:function(){return this.endTime-this.startTime}},{key:"distance",get:function(){return this.endOffset-this.startOffset}},{key:"speed",get:function(){return this.distance/this.interval}},{key:"start",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();this.startOffset=t,this.startTime=e}},{key:"end",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();this.endOffset=t,this.endTime=e}}],[{key:"Create",value:function(){return new t}}]),t}();r()(kn,"LIMIT_TIME",300),r()(kn,"LIMIT_DISTANCE",15);var Cn=function(){function t(){y()(this,t)}return b()(t,null,[{key:"Clamp",value:function(t,e,i){return Math.min(Math.max(e,t),i)}}]),t}(),Tn=C.Create("picker-column"),Pn={name:Tn.name,props:{readonly:{type:Boolean,default:!1},itemHeight:{type:Number,required:!0},visibleItemCount:{type:Number|String,required:!0},defaultIndex:{type:Number,default:0},swipeDuration:{type:Number,required:!0},items:{type:Array,default:function(){return[]}},suffix:{type:String,default:""},formatter:{type:Function,default:null}},data:function(){return{selectedIndex:this.defaultIndex,offset:0,duration:0,moving:!1,startOffset:0,correctAfterTransition:null,inertia:kn.Create(),touch:wn.Create()}},computed:{wrapperCls:function(){return Tn.derive("wrapper")},itemWrapperCls:function(){return Tn.derive("item-wrapper")},cls:function(){return Tn.derive()},suffixWrapperCls:function(){return Tn.derive("suffix-wrapper")},suffixCls:function(){return Tn.derive("suffix")},itemCount:function(){return this.items.length},baseOffset:function(){return this.itemHeight*(this.visibleItemCount-1)/2},wrapperStyle:function(){return{transform:"translate3d(0, ".concat(this.offset+this.baseOffset,"px, 0)"),transitionDuration:"".concat(this.duration,"ms"),transitionProperty:this.duration?"all":"none"}},itemStyle:function(){return{height:"".concat(this.itemHeight,"px"),lineHeight:"".concat(this.itemHeight,"px")}},suffixStyle:function(){return{height:"".concat(this.itemHeight,"px"),lineHeight:"".concat(this.itemHeight,"px")}}},watch:{defaultIndex:function(t){this.setIndex(t)}},created:function(){this.setIndex(this.selectedIndex)},updated:function(){this.selectedIndex>=this.itemCount&&this.setIndex(this.itemCount-1)},methods:{getTouchInfo:function(t){return t.touches[0]},getValue:function(){return this.items[this.selectedIndex]},setIndex:function(t,e){var i=this,n=this.correctIndex(t)||0,r=-n*this.itemHeight,o=function(){n!==i.selectedIndex&&(i.selectedIndex=n,e&&i.emitChange(n))};this.moving&&r!==this.offset?this.correctAfterTransition=o:o(),this.offset=r},emitChange:function(t){this.$emit("change",t)},correctIndex:function(t){for(var e=Cn.Clamp(t,0,this.itemCount),i=e;i<this.itemCount;i++)if(!this.isOptionDisabled(this.items[i]))return i;for(var n=e-1;n>=0;n--)if(!this.isOptionDisabled(this.items[n]))return n},isOptionDisabled:function(t){return"object"===l()(t)&&t.disabeld},onTouchStart:function(t){if(!this.readonly){var e=this.getTouchInfo(t);this.touch.start(e),this.duration=0,this.startOffset=this.offset,this.correctAfterTransition=null,this.inertia.start(this.offset)}},onTouchMove:function(t){if(!this.readonly){Y.PreventDefault(t);var e=this.getTouchInfo(t);if(this.touch.move(e),this.touch.isVertical){this.moving=!0,this.offset=Cn.Clamp(this.startOffset+this.touch.deltaY,-this.itemCount*this.itemHeight,this.itemHeight);var i=Date.now();i-this.touchStartTime>kn.LIMIT_TIME&&this.inertia.start(this.offset,i)}}},onTouchEnd:function(t){var e=this;if(!this.readonly)if(this.inertia.end(this.offset),this.inertia.shouldActive)this.startInertia();else{var i=this.getIndexByOffset(this.offset);this.duration=200,this.setIndex(i,!0),setTimeout((function(){return e.moving=!1}),0)}},onTransitionEnd:function(){this.stopInertia()},getIndexByOffset:function(t){return Cn.Clamp(Math.round(-t/this.itemHeight),0,this.itemCount-1)},startInertia:function(){var t=Math.abs(this.inertia.speed),e=this.offset+t/.003*(this.inertia.distance<0?-1:1),i=this.getIndexByOffset(e);this.duration=this.swipeDuration,this.setIndex(i,!0)},stopInertia:function(){this.moving=!1,this.duration=0,this.correctAfterTransition&&(this.correctAfterTransition(),this.correctAfterTransition=null)},onItemClick:function(t,e){this.moving||this.readonly||(this.correctAfterTransition=null,this.duration=200,this.setIndex(e,!0))}},render:function(){var t=this,e=arguments[0],i=function(){return t.items.map((function(i,n){var r=Tn.derive("item",{selected:n===t.selectedIndex});return e("li",{class:r,key:n,style:t.itemStyle,on:{click:function(e){return e.stopPropagation(),i=e,t.onItemClick(i,n);var i}}},[t.formatter?t.formatter(i.text):i.text])}))},n=function(){if(t.suffix)return e("div",{class:t.suffixWrapperCls},[e("div",{class:t.suffixCls,style:t.suffixStyle},[t.suffix])])};return e("div",{class:this.wrapperCls},[e("div",{class:this.itemWrapperCls,on:{touchstart:this.onTouchStart,touchmove:this.onTouchMove,touchend:this.onTouchEnd,touchcancel:this.onTouchEnd}},[e("ul",{class:this.cls,style:this.wrapperStyle,on:{transitionend:this.onTransitionEnd}},[i()])]),n()])}},Mn=C.Create("picker"),_n={name:Mn.name,components:{PickerColumn:Pn},props:{columns:{type:Array,default:function(){return[]}},itemHeight:{type:Number,default:50},visibleItemCount:{type:Number,default:5},swipeDuration:{type:Number,default:800},title:{type:String,default:""},readonly:{type:Boolean,default:!1},windowPattern:{type:String,default:"fill"}},computed:{cls:function(){return Mn.derive()},headerCls:function(){return Mn.derive("header")},titleCls:function(){return Mn.derive("header-title")},bodyCls:function(){return Mn.derive("body")},bodyStyle:function(){return{height:"".concat(this.itemHeight*this.visibleItemCount,"px")}},columnContainerCls:function(){return Mn.derive("body-column-container")},maskCls:function(){return Mn.derive("body-mask")},maskStyle:function(){return{backgroundSize:"100% ".concat(this.itemHeight*(this.visibleItemCount-1)/2,"px")}},windowCls:function(){return Mn.derive("body-window",[this.windowPattern])},windowStyle:function(){return{height:"".concat(this.itemHeight,"px")}},windowColumnCls:function(){return Mn.derive("body-window-column")},windowColumnSuffixCls:function(){return Mn.derive("body-window-column-suffix")},footerCls:function(){return Mn.derive("footer")},footerBtnCls:function(){return Mn.derive("footer-btn")}},methods:{onChange:function(t,e){var i=this,n=this.columns.map((function(t,e){return i.$refs["picker-column-".concat(e)].getValue()}));this.$emit("change",n,{columnIndex:t,selectedItemIndex:e})},onCancel:function(){this.$emit("cancel")},onConfirm:function(){this.$emit("confirm")}},render:function(){var t=this,e=arguments[0],i=function(){return e("div",{class:t.headerCls},[t.$slots.header||t.title&&e("div",{class:t.titleCls},[t.title])])},n=function(){var i=t.columns.map((function(i,n){return e(Pn,{key:n,ref:"picker-column-".concat(n),attrs:{readonly:t.readonly,items:i.items,"default-index":i.defaultIndex,"item-height":t.itemHeight,swipeDuration:t.swipeDuration,"visible-item-count":t.visibleItemCount,suffix:i.suffix,formatter:i.formatter},on:{change:function(e){return t.onChange(n,e)}}})}));return e("div",{class:t.bodyCls,style:t.bodyStyle},[e("div",{class:t.columnContainerCls},[i]),e("div",{class:t.maskCls,style:t.maskStyle}),e("div",{class:t.windowCls,style:t.windowStyle})])},r=function(){var i=[e("div",{class:t.footerBtnCls,on:{click:t.onCancel}},["取消"]),e("div",{class:t.footerBtnCls,on:{click:t.onConfirm}},["确定"])];return e("div",{class:t.footerCls},[t.$slots.footer||i])};return e("div",{class:this.cls},[i(),n(),r()])}};i(26);k.WithInstall(_n);var In=_n,Dn=C.Create("checkbox"),On={name:Dn.name,components:{Icon:A},props:{value:{type:Boolean,default:!1},text:{type:String,default:""},theme:{type:String,default:"brand"},color:{type:String,default:"#1989fa"},disabled:{type:Boolean,default:!1},icon:{type:String,default:"checkbox-checked"},activeIcon:{type:String,default:"checkbox-unchecked"},iconClassPrefix:{type:String,default:"mx-icon"}},computed:{cls:function(){return Dn.derive([this.theme,{disabled:this.disabled}])},contentCls:function(){return Dn.derive("content")}},model:{prop:"value",event:"change"},methods:{onClick:function(){this.disabled||this.$el.hasAttribute("disabled")||this.emitChange(!this.value)},emitChange:function(t){this.$emit("change",t)}},render:function(){var t=this,e=arguments[0];return e("div",{class:this.cls,on:{click:function(e){return e.stopPropagation(),t.onClick(e)}}},[e(A,{attrs:{name:this.value?this.activeIcon:this.icon,"class-prefix":this.iconClassPrefix,size:"20",theme:this.theme,color:this.color}}),this.$slots.default||this.text&&e("div",{class:this.contentCls},[this.text])])}};i(27);k.WithInstall(On);var En=On,An=C.Create("radio"),Bn={name:An.name,components:{Icon:A},props:{value:{type:Boolean,default:!1},text:{type:String,default:""},disabled:{type:Boolean,default:!1},theme:{type:String,default:"brand"},icon:{type:String,default:"checked"},activeIcon:{type:String,default:"unchecked"},iconClassPrefix:{type:String,default:"mx-icon"},color:{type:String,default:"#1989fa"}},computed:{cls:function(){return An.derive([this.theme,{disabled:this.disabled}])},contentCls:function(){return An.derive("content")}},model:{prop:"value",event:"change"},methods:{onClick:function(){this.disabled||this.$el.hasAttribute("disabled")||this.emitChange(!this.value)},emitChange:function(t){this.$emit("change",t)}},render:function(){var t=this,e=arguments[0];return e("div",{class:this.cls,on:{click:function(e){return e.stopPropagation(),t.onClick(e)}}},[e(A,{attrs:{name:this.value?this.activeIcon:this.icon,"class-prefix":this.iconClassPrefix,size:"20",theme:this.theme,color:this.color}}),this.$slots.default||this.text&&e("div",{class:this.contentCls},[this.text])])}};i(28);k.WithInstall(Bn);var Yn=Bn,zn=C.Create("rate"),Nn={name:zn.name,components:{Icon:A},props:{value:{type:Number,default:0},count:{type:Number,default:5},size:{type:String|Number,default:"middle"},gutter:{type:Number,default:0},color:{type:String,default:"#c7c7cc"},activeColor:{type:String,default:"#FF9500"},icon:{type:String,default:"star-line"},activeIcon:{type:String,default:"star"},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},touchable:{type:Boolean,default:!1},allowHalf:{type:Boolean,default:!1}},model:{prop:"value",event:"change"},data:function(){return{rectScoreMap:[]}},computed:{cls:function(){return zn.derive({disabled:this.disabled})},itemCls:function(){return zn.derive("item",[this.size])},halfItemCls:function(){return zn.derive("item-half")},iconSize:function(){if(Number.isNaN(parseInt(this.size))){var t=16;switch(this.size){case"small":t=16;break;case"middle":t=28;break;case"large":t=32}return t}return this.size},itemMetaList:function(){for(var t=[],e=this.value>this.count?this.value%this.count:this.value,i=0;i<this.count;i++)t.push(this.getMetaByIndex(i+1,e));return t}},methods:{getMetaByIndex:function(t,e){var i={type:this.icon,color:this.color,isHalf:!1};return e>=t?(i.type=this.activeIcon,i.color=this.activeColor,i):(e+.5>=t&&this.allowHalf&&(i.isHalf=!0),i)},mapScoreWithRange:function(){for(var t=[],e=0;e<this.itemMetaList.length;e++){var i=this.$refs["item_".concat(e)].getBoundingClientRect();this.allowHalf?t.push({left:i.left,score:e+.5},{left:i.left+i.width/2,score:e+1}):t.push({left:i.left,score:e+1})}this.rectScoreMap=t},getScoreByPosition:function(t){for(var e=this.rectScoreMap.length-1;e>0;e--){var i=this.rectScoreMap[e];if(i.left<=t)return i.score}return this.allowHalf?.5:1},onTouchStart:function(t){this.readonly||!this.touchable||this.disabled||this.mapScoreWithRange()},onTouchMove:function(t){if(!this.readonly&&this.touchable&&!this.disabled){var e=t.touches[0].clientX,i=this.getScoreByPosition(e);this.emitChange(i)}},onClick:function(t,e){if(!this.readonly&&!this.disabled){var i=e;if(this.allowHalf){var n=t.currentTarget.getBoundingClientRect(),r=n.left+n.width/2;i+=t.clientX<=r?.5:1}else i+=1;this.emitChange(i)}},emitChange:function(t){this.$emit("change",t)}},render:function(){var t=this,e=arguments[0],i=function(){return t.itemMetaList.map((function(i,n){return e("div",{ref:"item_".concat(n),class:t.itemCls,on:{click:function(e){return t.onClick(e,n)}}},[e(A,{attrs:{name:i.type,color:i.color,size:t.iconSize}}),i.isHalf&&e("div",{class:t.halfItemCls},[e(A,{attrs:{name:t.activeIcon,color:t.activeColor,size:t.iconSize}})])])}))};return e("div",{class:this.cls,on:{touchstart:this.onTouchStart,touchmove:this.onTouchMove}},[i()])}};i(29);k.WithInstall(Nn);var Hn=Nn;i(30);k.WithInstall(Pn);var Ln=Pn,Xn=i(59),Fn=i.n(Xn),jn=function(){function t(){y()(this,t)}return b()(t,null,[{key:"IsLeapYearEx",value:function(t){return this.IsLeapYear(t.getFullYear())}},{key:"IsLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}}]),t}(),Rn=C.Create("date-time-picker"),$n=new Date,Wn={name:Rn.name,components:{Picker:_n},props:{pattern:{type:String,default:"date"},itemHeight:{type:Number,default:50},visibleItemCount:{type:Number,default:5},swipeDuration:{type:Number,default:800},title:{type:String,default:""},readonly:{type:Boolean,default:!1},minDate:{type:Date,default:function(){return new Date($n.getFullYear()-10,0,1)}},maxDate:{type:Date,default:function(){return new Date($n.getFullYear()+10,11,31)}},minTime:{type:String,default:"00:00:00"},maxTime:{type:String,default:"23:59:59"},showSuffix:{type:Boolean,default:!1},value:{type:Date|String,required:!0},windowPattern:{type:String,default:"fill"}},model:{prop:"value",event:"change"},computed:{isDate:function(){return"date"===this.pattern},isDateTime:function(){return"datetime"===this.pattern},isTime:function(){return"time"===this.pattern},currentYear:function(){return this.value.getFullYear()},currentMonth:function(){return this.value.getMonth()},currentDay:function(){return this.value.getDate()},currentHour:function(){return this.value.getHours()},currentMinute:function(){return this.value.getMinutes()},currentSecond:function(){return this.value.getSeconds()},minYear:function(){return this.minDate.getFullYear()},minMonth:function(){return this.minDate.getMonth()},minDay:function(){return this.minDate.getDate()},minHour:function(){return this.minDate.getHours()},minMinute:function(){return this.minDate.getMinutes()},minSecond:function(){return this.minDate.getSeconds()},maxYear:function(){return this.maxDate.getFullYear()},maxMonth:function(){return this.maxDate.getMonth()},maxDay:function(){return this.maxDate.getDate()},maxtHour:function(){return this.maxDate.getHours()},maxMinute:function(){return this.maxDate.getMinutes()},maxSecond:function(){return this.maxDate.getSeconds()},yearSuffix:function(){return this.showSuffix?"年":""},monthSuffix:function(){return this.showSuffix?"月":""},daySuffix:function(){return this.showSuffix?"日":""},hourSuffix:function(){return this.showSuffix?"时":""},minuteSuffix:function(){return this.showSuffix?"分":""},secondSuffix:function(){return this.showSuffix?"秒":""},timeArray:function(){return this.value.split(":").map((function(t){return Number(t)}))},minTimeArray:function(){return this.minTime.split(":").map((function(t){return Number(t)}))},maxTimeArray:function(){return this.maxTime.split(":").map((function(t){return Number(t)}))},currentTimeHour:function(){return this.timeArray[0]},currentTimeMinute:function(){return this.timeArray[1]||0},currentTimeSecond:function(){return this.timeArray[2]||0},minTimeHour:function(){return this.minTimeArray[0]||0},minTimeMinute:function(){return this.minTimeArray[1]||0},minTimeSecond:function(){return this.minTimeArray[2]||0},maxTimeHour:function(){return this.maxTimeArray[0]||23},maxTimeMinute:function(){return this.maxTimeArray[1]||59},maxTimeSecond:function(){return this.maxTimeArray[2]||59},columns:function(){return this.getColumns()}},methods:{getColumns:function(){var t=[];switch(this.pattern){case"date":t=this.getDate();break;case"time":t=this.getTimeSolely();break;case"datetime":t=this.getDateTime()}return t},getDate:function(){return[this.getYear(),this.getMonth(),this.getDay()]},getTime:function(){return[this.getHour(),this.getMinute(),this.getSecond()]},getDateTime:function(){return[].concat(v()(this.getDate()),v()(this.getTime()))},getMaxDayByLearMonth:function(t,e){var i=0;switch(e+1){case 2:i=jn.IsLeapYear(t)?29:28;break;case 4:case 6:case 9:case 11:i=30;break;default:i=31}return i},getYear:function(){var t=this.currentYear,e=this.minYear,i=this.maxYear,n=this.yearSuffix;return this.getColumn(t,e,i,n,4)},getMonth:function(){var t=this.currentMonth,e=this.currentYear===this.minYear?this.minMonth:0,i=this.currentYear===this.maxYear?this.maxMonth:11,n=this.monthSuffix;return this.getColumn(t,e,i,n,!0)},getDay:function(){var t=this.currentDay,e=this.value<=this.minDate||this.currentYear===this.minYear&&this.currentMonth===this.minMonth?this.minDay:1,i=this.value>=this.maxDate||this.currentYear===this.maxYear&&this.currentMonth===this.maxMonth?this.maxDay:this.getMaxDayByLearMonth(this.currentYear,this.currentMonth),n=this.daySuffix;return this.getColumn(t,e,i,n)},getHour:function(){var t=this.currentHour,e=this.value<=this.minDate||this.currentYear===this.minYear&&this.currentMonth===this.minMonth&&this.currentDay===this.minDay?this.minHour:0,i=this.value>=this.maxDate||this.currentYear>=this.maxYear&&this.currentMonth===this.maxMonth&&this.currentDay===this.maxDay?this.maxtHour:23,n=this.hourSuffix;return this.getColumn(t,e,i,n)},getMinute:function(){var t=this.currentMinute,e=this.value<=this.minDate||this.currentYear===this.minYear&&this.currentMonth===this.minMonth&&this.currentDay===this.minDay&&this.currentHour===this.minHour?this.minMinute:0,i=this.value>=this.maxDate||this.currentYear===this.maxYear&&this.currentMonth===this.maxMonth&&this.currentDay===this.maxDay&&this.currentHour===this.maxtHour?this.maxMinute:59,n=this.minuteSuffix;return this.getColumn(t,e,i,n)},getSecond:function(){var t=this.currentMinute,e=this.value<=this.minDate||this.currentYear===this.minYear&&this.currentMonth===this.minMonth&&this.currentDay===this.minDay&&this.currentHour===this.minHour&&this.currentMinute===this.minMinute?this.minSecond:0,i=this.value>=this.maxDate||this.currentYear===this.maxYear&&this.currentMonth===this.maxMonth&&this.currentDay===this.maxDay&&this.currentHour===this.maxtHour&&this.currentMinute===this.maxMinute?this.maxSecond:59,n=this.secondSuffix;return this.getColumn(t,e,i,n)},getTimeSolely:function(){return[this.getHourSolely(),this.getMinuteSolely(),this.getSecondSolely()]},getHourSolely:function(){var t=this.currentTimeHour,e=this.minTimeHour,i=this.maxTimeHour,n=this.hourSuffix;return this.getColumn(t,e,i,n)},getMinuteSolely:function(){var t=this.currentTimeMinute,e=this.currentTimeHour===this.minTimeHour?this.minTimeMinute:0,i=this.currentTimeHour===this.maxTimeHour?this.maxTimeMinute:59,n=this.minuteSuffix;return this.getColumn(t,e,i,n)},getSecondSolely:function(){var t=this.currentTimeSecond,e=this.currentTimeHour===this.minTimeHour&&this.currentTimeMinute===this.minTimeMinute?this.minTimeSecond:0,i=this.currentTimeHour===this.maxTimeHour&&this.currentTimeMinute===this.maxTimeMinute?this.maxTimeSecond:59,n=this.secondSuffix;return this.getColumn(t,e,i,n)},getColumn:function(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"0",a=this.generateItems(e,i,o,s,r),l=a.findIndex((function(e){return e.value===t}));return{defaultIndex:-1===l?0:l,items:a,suffix:n}},generateItems:function(t,e){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"0",r=arguments.length>4?arguments[4]:void 0,o=[],s=t;s<=e;s++)o.push({text:String(r?s+1:s).padStart(i,n),value:s});return o},onChange:function(t,e){if(this.isDate||this.isDateTime){var i=t.map((function(t){return t.value}));this.$emit("change",Fn()(Date,v()(i)))}else this.isTime&&this.$emit("change",t.join(":"))},onCancel:function(){this.$emit("cancel")},onConfirm:function(){this.$emit("confirm")}},render:function(){var t=arguments[0];return t(_n,{attrs:{readonly:this.readonly,title:this.title,"item-height":this.itemHeight,"visible-item-count":this.visibleItemCount,"swipe-duration":this.swipeDuration,"window-pattern":this.windowPattern,columns:this.columns},on:{change:this.onChange,cancel:this.onCancel,confirm:this.onConfirm}})}};i(31);k.WithInstall(Wn);var Gn=Wn;i(32);k.WithInstall(O);var Vn=O,qn=C.Create("mask"),Un={name:qn.name,components:{Popup:Nt,Icon:A},props:{show:{type:Boolean,default:!1},overlay:{type:Boolean,default:!0},zIndex:{type:Number,default:1030},lockScroll:{type:Boolean,default:!1},duration:{type:Number,default:.36},overlayStyle:{type:Object,default:function(){}},closeOnClickOveraly:{type:Boolean,default:!0},img:{type:String,required:!0}},computed:{cls:function(){return qn.derive()},imgCls:function(){return qn.derive("img")},closeCls:function(){return qn.derive("close")}},methods:{onClose:function(){this.$emit("close")},onImgClick:function(t){this.$emit("img-click",t)}},render:function(){var t=arguments[0];return t(Nt,{attrs:{show:this.show,overlay:this.overlay,"z-index":this.zIndex,"lock-scroll":this.lockScroll,duration:this.duration,"overlay-style":this.overlayStyle,position:"center"},on:{close:this.onClose,"close-on-click-overlay":this.closeOnClickOveraly}},[t("div",{class:this.cls},[this.img&&t("img",{class:this.imgCls,attrs:{src:this.img},on:{click:this.onImgClick}}),t("div",{class:this.closeCls},[this.$slots.close||t(A,{attrs:{size:"35",name:"close",color:"#fff"},on:{click:this.onClose}})])])])}};i(33);k.WithInstall(Un);var Kn=Un,Zn=C.Create("action-sheet"),Qn={name:Zn.name,components:{Popup:Nt,Icon:A},props:{show:{type:Boolean,default:!1},overlay:{type:Boolean,default:!0},zIndex:{type:Number,default:1030},lockScroll:{type:Boolean,default:!1},duration:{type:Number,default:.36},overlayStyle:{type:Object,default:function(){}},round:{type:Boolean,default:!0},closeOnClickOveraly:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:!0},actions:{type:Array,default:function(){return[]}},title:{type:String,default:""},description:{type:String,default:""},cancelText:{type:String,default:""},closeOnClickAction:{type:Boolean,default:!0},background:{type:String}},model:{prop:"show",event:"close"},computed:{cls:function(){return Zn.derive()},headerCls:function(){return Zn.derive("header")},titleCls:function(){return Zn.derive("header-title")},descCls:function(){return Zn.derive("header-desc")},bodyCls:function(){return Zn.derive("body")},footerCls:function(){return Zn.derive("footer")},btnCls:function(){return Zn.derive("footer-btn")}},methods:{getActionItemCls:function(t){return Zn.derive("body-action-item",{disabled:t.disabled})},getActionItemStyle:function(t){var e={};return t.color&&(e.color=t.color),e},close:function(){this.$emit("close",!1)},onSelectItem:function(t,e){this.closeOnClickAction&&this.close(),this.$emit("select",t,e)},onClickCancel:function(){this.close()},onClose:function(){this.close()}},render:function(){var t=this,e=arguments[0],i=function(){if(t.title)return e("div",{class:t.headerCls},[t.$slots.header||e("div",{class:t.titleCls},[t.title])])},n=function(){var i,n,r=t.actions.map((function(i,n){return e("div",{key:n,class:t.getActionItemCls(i),style:t.getActionItemStyle(i),on:{click:function(e){return e.stopPropagation(),n=e,t.onSelectItem(i,n);var n}}},[i.name])}));return e("div",{class:t.bodyCls},[(null===(i=(n=t.$scopedSlots).body)||void 0===i?void 0:i.call(n,{actions:t.actions}))||r])},r=function(){var i,n;if(t.cancelText)return e("div",{class:t.footerCls,on:{click:function(e){return e.stopPropagation(),t.onClickCancel(e)}}},[(null===(i=(n=t.$scopedSlots).footer)||void 0===i?void 0:i.call(n,{cancelText:t.cancelText}))||e("div",{class:t.btnCls},[t.cancelText])])};return e(Nt,{attrs:{show:this.show,overlay:this.overlay,"z-index":this.zIndex,"lock-scroll":this.lockScroll,duration:this.duration,"overlay-style":this.overlayStyle,round:this.round,"safe-area-inset-bottom":this.safeAreaInsetBottom,position:"bottom",background:this.background},on:{"close-on-click-overlay":this.closeOnClickOveraly,close:this.onClose}},[e("div",{class:this.cls},[i(),n(),r()])])}};i(34);k.WithInstall(Qn);var Jn=Qn,tr=C.Create("toast"),er={name:tr.name,components:{Overlay:Yt,Icon:A,Loading:X},props:{show:{type:Boolean,default:!1},overlay:{type:Boolean,default:!1},zIndex:{type:Number,default:1030},duration:{type:Number,default:1600},overlayStyle:{type:Object,default:function(){}},closeOnClickOveraly:{type:Boolean,default:!0},position:{type:String,default:"center"},message:{type:String,default:""},theme:{type:String,default:"dark"},icon:{type:String,default:""},loading:{type:Boolean,default:!1}},data:function(){return{timer:0}},computed:{cls:function(){return tr.derive([this.theme,this.position,{round:this.round,icon:this.hasIcon&&!this.message,it:this.hasIcon&&this.message}])},textCls:function(){return tr.derive("text",[this.theme,{icon:this.hasIcon}])},transitionName:function(){return tr.derive("fade")},hasIcon:function(){return this.icon||this.loading}},watch:{show:function(){this.toast()}},methods:{onClickOverlay:function(t){this.closeOnClickOveraly&&this.close(t)},onClose:function(t){this.close(t)},close:function(t){this.$emit("close",t)},clearTimer:function(){window.clearTimeout(this.timer)},toast:function(){var t=this;this.clearTimer(),this.show&&this.duration&&(this.timer=window.setTimeout((function(){t.close()}),this.duration))}},render:function(){var t=this,e=arguments[0],i=function(){return t.loading?e(X,{attrs:{size:"32",type:"spinner"}}):t.icon?e(A,{attrs:{name:t.icon,size:"32"}}):void 0},n=function(){if(t.overlay)return e(Yt,{attrs:{show:t.show,"z-index":t.zIndex,"lock-scroll":t.lockScroll,"overlay-style":t.overlayStyle},on:{click:t.onClickOverlay}})},r=function(){return e("transition",{attrs:{name:t.transitionName}},[t.show&&e("div",{class:t.cls},[i(),t.message&&e("div",{class:t.textCls},[t.message])])])};return e("div",[n(),r()])}};function ir(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function nr(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ir(Object(i),!0).forEach((function(e){r()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ir(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var rr=k.InvokeComponent((function(t){return{data:function(){return{options:{show:!1,overlay:!1,zIndex:1030,duration:1600,overlayStyle:{},closeOnClickOveraly:!0,position:"center",message:"",theme:"dark",icon:"",loading:!1}}},methods:{open:function(t){this.options=nr(nr(nr({},this.options),t),{},{show:!0})},onClose:function(){t()}},render:function(){var t=arguments[0];return t(er,{props:nr({},this.options),on:{close:this.onClose}})}}}));i(35);k.WithInstall(er,rr);var or=er,sr=C.Create("tab-bar"),ar={name:sr.name,props:{value:{type:Number|String,default:0},fixed:{type:Boolean,default:!1},activeColor:{type:String,default:"#000000"},inactiveColor:{type:String,default:"#8a8a8f"},safeAreaInsetBottom:{type:Boolean,default:!1}},model:{prop:"value",event:"change"},computed:{cls:function(){return sr.derive([{fixed:this.fixed,"safe-area-inset-bottom":this.fixed&&this.safeAreaInsetBottom}])}},methods:{setActive:function(t){this.$emit("change",t)}},render:function(){var t=arguments[0];return t("div",{class:this.cls},[this.$slots.default])}};i(36);k.WithInstall(ar);var lr=ar,cr=C.Create("tab-bar-item"),hr={name:cr.name,components:{Icon:A},props:{name:{type:String,default:""},icon:{type:String,default:""},iconPrefix:{type:String},dot:{type:Boolean,default:!1},badge:{type:Number|String},size:{type:Number,default:48}},computed:{cls:function(){return cr.derive({active:this.active})},style:function(){return{color:this.active?this.$parent.activeColor:this.$parent.inactiveColor}},textCls:function(){return cr.derive("text")},index:function(){return this.$parent.$children.indexOf(this)},active:function(){return this.$parent.value===(this.name||this.index)}},methods:{onClick:function(t){this.$parent.setActive(this.name||this.index),this.$emit("click",t)}},render:function(){var t=this,e=arguments[0],i=function(){return t.$scopedSlots.icon?t.$scopedSlots.icon({active:t.active}):t.icon?e(A,{attrs:{classPrefix:t.classPrefix,name:t.icon,size:t.size,badge:t.badge,dot:t.dot,offset:[0,5]}}):void 0};return e("div",{class:this.cls,style:this.style,on:{click:this.onClick}},[i(),e("div",{class:this.textCls},[this.$slots.default])])}};i(37);k.WithInstall(hr);var ur=hr;function fr(t){return{provide:function(){return r()({},t,this)},data:function(){return{children:[]}}}}var pr=C.Create("tab"),dr={name:pr.name,mixins:[fr(pr.name)],components:{Badge:O,Icon:A},props:{value:{type:String|Number,default:0},type:{type:String,default:"line"},position:{type:String,default:"top"},duration:{type:String|Number,default:.36},lineColor:{type:String,default:"#000000"},lineSize:{type:String|Number,default:"2"},animated:{type:Boolean,default:!1},headerClass:{type:String},titleActiveColor:{type:String,default:"#000000"},titleActiveBackground:{type:String,default:"#000000"},titleInactiveBackground:{type:String,default:"#F2F2F2"},titleInactiveColor:{type:String,default:"#8A8A8F"}},model:{prop:"value",event:"change"},data:function(){return{inited:!1,isLineInited:!1}},computed:{cls:function(){return pr.derive([this.position])},headerCls:function(){return[pr.derive("header",[this.position]),this.headerClass]},navCls:function(){return pr.derive("nav",[this.position])},navStyle:function(){var t={};if(this.inited){var e=this.$refs.nav,i=this.isHorizental?e.scrollWidth-e.offsetWidth:e.scrollHeight-e.offsetHeight,n=this.$refs["nav_button_".concat(this.value)],r=this.isHorizental?n.offsetLeft+n.offsetWidth/2-e.offsetWidth/2:n.offsetTop+n.offsetHeight/2-e.offsetHeight/2;t.transform="translate".concat(this.isHorizental?"X":"Y","(").concat(-Cn.Clamp(r,0,i),"px)")}return t},lineCls:function(){return pr.derive("nav-line",[this.position])},lineStyle:function(){if("line"===this.type){var t=r()({background:this.lineColor},this.isHorizental?"height":"width","".concat(this.lineSize,"px"));if(this.inited){var e=this.$refs["nav_button_text_".concat(this.value)];t[this.isHorizental?"width":"height"]="".concat(this.isHorizental?e.offsetWidth:e.offsetHeight,"px"),t.transform="translate".concat(this.isHorizental?"X":"Y","(").concat(this.isHorizental?e.offsetLeft:e.offsetTop,"px)"),this.isLineInited||(t.transitionDuration="0s",this.isLineInited=!0)}return t}},bodyCls:function(){return pr.derive("body",[this.position])},trackCls:function(){return pr.derive("body-track")},trackStyle:function(){return{transform:"translateX(".concat(100*-this.value,"%)"),transitionDuration:this.inited&&this.animated?"".concat(this.duration,"s"):"0s"}},buttonIconCls:function(){return pr.derive("nav-button-text--button-icon")},isFrontHeader:function(){return"top"===this.position||"left"===this.position},isRearHeader:function(){return"bottom"===this.position||"right"===this.position},isVertical:function(){return"left"===this.position||"right"===this.position},isHorizental:function(){return"top"===this.position||"bottom"===this.position}},mounted:function(){var t=this;this.$nextTick((function(){return t.inited=!0}))},methods:{onButtonClick:function(t,e,i){this.$emit("change",e)}},render:function(){var t=this,e=arguments[0],i=function(){return t.children.map((function(i,n){var r,o,s=t.value===n,a=pr.derive("nav-button",[t.position,t.type]),l=pr.derive("nav-button-text",["button"===t.type?"button":"text",{active:s}]),c={color:s?t.titleActiveColor:t.titleInactiveColor};"button"===t.type&&(c.background=s?t.titleActiveBackground:t.titleInactiveBackground);var h="button"===t.type?"div":"span",u=e(h,{ref:"nav_button_text_".concat(n),class:l,style:c},[(null===(r=(o=i.$scopedSlots).title)||void 0===r?void 0:r.call(o,{active:s}))||[i.icon&&e(A,{class:t.buttonIconCls,attrs:{name:i.icon,size:i.iconSize,color:c.color}}),i.title]]),f=i.dot||i.badge?e(O,{attrs:{dot:i.dot,content:i.badge,small:!0}},[u]):u;return e("div",{ref:"nav_button_".concat(n),class:a,on:{click:function(e){return t.onButtonClick(i,n,e)}}},[f])}))},n=function(){return e("div",{ref:"header",class:t.headerCls},[e("div",{ref:"nav",class:t.navCls,style:t.navStyle},[i(),"line"===t.type&&e("div",{class:t.lineCls,style:t.lineStyle})])])};return e("div",{class:this.cls},[this.isFrontHeader&&n(),e("div",{class:this.bodyCls},[e("div",{class:this.trackCls,style:this.trackStyle},[this.$slots.default])]),this.isRearHeader&&n()])}};i(38);k.WithInstall(dr);var gr=dr;function vr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.indexKey||"index";return{inject:r()({},t,{default:null}),computed:r()({parent:function(){return this.disableBindingRelation?null:this[t]}},i,(function(){return this.bindRelation(),this.parent?this.parent.children.indexOf(this):null})),watch:{disableBindingRelation:function(t){t||this.bindRelation()}},mounted:function(){this.bindRelation()},beforeDestroy:function(){var t=this;this.parent&&(this.parent.children=this.parent.children.filter((function(e){return e!==t})))},methods:{bindRelation:function(){this.parent&&-1===this.parent.children.indexOf(this)&&(this.parent.children=k.SortChildren([].concat(v()(this.parent.children),[this]),this.parent))}}}}var mr=C.Create("tab-pane"),yr={name:mr.name,mixins:[vr(pr.name)],props:{title:{type:String},disabled:{type:Boolean,default:!1},dot:{type:Boolean,default:!1},badge:{type:String|Number},icon:{type:String},iconSize:{type:String|Number,default:18},titleClass:{type:String|Object},titleStyle:{type:String|Object}},computed:{cls:function(){return mr.derive()}},render:function(){var t=arguments[0];return t("div",{class:this.cls},[this.$slots.default])}};i(39);k.WithInstall(yr);var xr=yr,br=$({name:"mx-catalog",props:{title:{type:String,default:null},backgroundColor:{type:String,default:"#f9f9f9"},textColor:{type:String,default:"#8a8a8f"},avatarIcon:{type:String,default:""},hasMargin:{type:Boolean,default:!0}},data:function(){return{}},methods:{}},(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{class:["mx-catalog",t.hasMargin&&"has-margin"],style:{backgroundColor:t.backgroundColor}},[t.avatarIcon?i("img",{staticClass:"avatar-icon",attrs:{src:"avatarIcon",alt:"*"}}):t._e(),t._v(" "),t._t("default",(function(){return[t._v("\n    "+t._s(t.title)+"\n  ")]}))],2)}),[],!1,null,null,null).exports;i(40);k.WithInstall(br);var Sr=br,wr=C.Create("slider"),kr={name:wr.name,props:{linear:{type:Array,default:function(){return[]}},value:{type:Number,default:0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},trackHeight:{type:Number,default:-1},buttonSize:{type:Number,default:-1},trackColor:{type:String},barColor:{type:String},scaleColor:{type:String},buttonColor:{type:String},theme:{type:String,default:"brand"},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},model:{prop:"value",event:"input"},data:function(){return{touch:wn.Create(),current:0,startValue:0,dragStatus:""}},computed:{wrapperCls:function(){return wr.derive("wrapper",{disabled:this.disabled})},cls:function(){return wr.derive()},trackCls:function(){return wr.derive("track")},barCls:function(){return wr.derive("bar",[this.theme])},buttonCls:function(){return wr.derive("button",[this.theme])},scaleCls:function(){return wr.derive("scale-wrapper")},scaleTextCls:function(){return wr.derive("scale-text")},sliderStyle:function(){var t={};return this.buttonSize>0&&(t.height="".concat(this.buttonSize,"px")),t},trackStyle:function(){var t={};return this.trackColor&&(t.background=this.trackColor),this.trackHeight&&(t.height="".concat(this.trackHeight,"px")),t},barStyle:function(){var t={width:"".concat(100*(this.value-this.min)/this.scope,"%")};return this.dragStatus&&(t.transition="none"),this.linear.length>0&&(t.background="linear-gradient(to right, ".concat(this.linear.join(","),")")),this.barColor&&(t.background=this.barColor),t},buttonStyle:function(){var t={};return this.linear.length>0&&(t.background=this.linear[this.linear.length-1]),this.buttonColor&&(t.background=this.buttonColor),this.buttonSize>0&&(t.width="".concat(this.buttonSize,"px"),t.height="".concat(this.buttonSize,"px"),t.borderRadius="".concat(this.buttonSize/2," px")),t},scaleStyle:function(){var t={};return this.scaleColor&&(t.color=this.scaleColor),t},canInteract:function(){return!this.disabled&&!this.readonly},scope:function(){return this.max-this.min}},methods:{onClick:function(t){if(t.stopPropagation(),this.canInteract){var e=this.$refs.slider.getBoundingClientRect(),i=t.clientX-e.left,n=e.width,r=this.min+i/n*this.scope;this.update(r,!0)}},onTouchStart:function(t){this.canInteract&&(this.touch.start(t),this.current=this.value,this.startValue=this.format(this.current),this.dragStatus="start")},onTouchMove:function(t){if(this.canInteract){"start"===this.dragStatus&&this.$emit("dragstart",t),Y.PreventDefault(t),this.touch.move(t),this.dragStatus="draging";var e=this.$refs.slider.getBoundingClientRect(),i=this.touch.deltaX/e.width*this.scope;this.current=this.startValue+i,this.update(this.current)}},onTouchEnd:function(t){this.canInteract&&("draging"===this.dragStatus&&(this.update(this.current,!0),this.$emit("dragend",t)),this.dragStatus="")},format:function(t){var e=+this.min,i=+this.max,n=+this.step,r=Cn.Clamp(t,e,i);return e+Math.round((r-e)/n)*n},update:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.format(t);i!==this.value&&this.$emit("input",i),e&&i!==this.startValue&&this.$emit("change",i)}},render:function(){var t=this,e=arguments[0],i=function(){return e("div",{ref:"slider",class:t.cls,style:t.sliderStyle,on:{click:t.onClick}},[e("div",{class:t.trackCls,style:t.trackStyle},[e("div",{class:t.barCls,style:t.barStyle},[e("div",{class:t.buttonCls,style:t.buttonStyle,on:{touchstart:t.onTouchStart,touchmove:t.onTouchMove,touchend:t.onTouchEnd,touchcancel:t.onTouchEnd,click:function(t){return t.stopPropagation()}}})])])])},n=function(){if(t.$slots.default)return e("div",{class:t.scaleCls,style:t.scaleStyle},[t.$slots.default])};return e("div",{class:this.wrapperCls},[i(),n()])}};i(41);k.WithInstall(kr);var Cr=kr,Tr=C.Create("slider-scale"),Pr={name:Tr.name,props:{value:{type:Number}},computed:{cls:function(){return Tr.derive({"first-child":this.value==this.$parent.min,"last-child":this.value==this.$parent.max})},style:function(){var t={},e=(this.value-this.$parent.min)/this.$parent.scope*100;return t.left="".concat(e,"%"),t}},render:function(){var t=arguments[0];return t("div",{class:this.cls,style:this.style},[this.$slots.default])}};i(42);k.WithInstall(Pr);var Mr=Pr,_r=C.Create("pull-refresh"),Ir={name:_r.name,props:{distanceToRefresh:{type:Number,default:50},loading:{type:Boolean,default:!1},finished:{type:Boolean,default:!1}},data:function(){return{status:"normal",isReachTop:!1,touch:wn.Create()}},computed:{cls:function(){return _r.derive()},containerCls:function(){return _r.derive("container")},infoCls:function(){return _r.derive("info")},viewerCls:function(){return _r.derive("viewer")},containerStyle:function(){var t=this.ease(this.touch.deltaY);return this.isLoading&&(t=this.distanceToRefresh),"transform:translateY(".concat(t,"px)")},infoStyle:function(){return"height:".concat(this.distanceToRefresh,"px")},isPulling:function(){return"pulling"===this.status},isLoosing:function(){return"loosing"===this.status},isLoading:function(){return this.loading},isFinished:function(){return this.finished},isTouchable:function(){return!this.isLoading}},methods:{onTouchStart:function(t){this.isTouchable&&this.isReachEdge()&&this.touch.start(t)},onTouchMove:function(t){this.isTouchable&&this.isReachEdge()&&(0===this.touch.startY?this.touch.start(t):(this.touch.move(t),this.touch.deltaY>0&&(Y.PreventDefault(t),this.touch.deltaY<this.distanceToRefresh?this.status="pulling":this.status="loosing")))},onTouchEnd:function(t){this.touch.deltaY>this.distanceToRefresh&&this.$emit("refresh",t),this.touch.reset(),this.status="normal"},isReachEdge:function(){return 0===this.$refs.viewer.scrollTop},ease:function(t){var e=t<0?0:t;return e>this.distanceToRefresh&&(e=e<2*this.distanceToRefresh?this.distanceToRefresh+(e-this.distanceToRefresh)/2:1.5*this.distanceToRefresh+(e-2*this.distanceToRefresh)/4),Math.round(e)}},render:function(){var t=this,e=arguments[0],i=function(){return t.$slots.pull||e("div",["下拉刷新"])},n=function(){return t.$slots.loading||e("mx-loading",{attrs:{type:"spinner",size:18}})},r=function(){return t.$slots.loose||e("div",["释放刷新"])},o=function(){return t.$slots.finished||e("div",["- 没有更多内容了 -"])},s=function(){return e("div",{class:t.infoCls,style:t.infoStyle},[!t.isFinished&&t.isPulling&&i(),!t.isFinished&&t.isLoosing&&r(),!t.isFinished&&t.isLoading&&n(),t.isFinished&&o()])},a=function(){return e("div",{ref:"viewer",class:t.viewerCls},[t.$slots.default])};return e("div",{class:this.cls},[e("div",{class:this.containerCls,style:this.containerStyle,on:{touchstart:this.onTouchStart,touchmove:this.onTouchMove,touchend:this.onTouchEnd,touchcancel:this.onTouchEnd}},[s(),a()])])}};i(43);k.WithInstall(Ir);var Dr=Ir;i(44);k.WithInstall(X);var Or=X;function Er(t){("undefined"!=typeof window?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}:function(t){setTimeout(t,1e3/60)})(t)}function Ar(t){Er((function(){return Er(t)}))}var Br=C.Create("swiper"),Yr={name:Br.name,mixins:[fr(Br.name)],props:{autoplay:{type:String|Number},duration:{type:String|Number,default:500},defaultActive:{type:String|Number,default:0},loop:{type:Boolean,default:!0},showIndicator:{type:Boolean,default:!0},indicatorColor:{type:String},vertical:{type:Boolean,default:!1},swipeable:{type:Boolean,default:!0}},data:function(){return{rect:null,width:0,height:0,offset:0,active:0,swiping:!1,touch:wn.Create(),touchStartTime:-1,autoplayTimer:-1}},computed:{cls:function(){return Br.derive()},trackCls:function(){return Br.derive("track",{vertical:this.vertical})},trackStyle:function(){var t={transitionDuration:"".concat(this.swiping?0:this.duration,"ms"),transform:"translate".concat(this.vertical?"Y":"X","(").concat(this.offset,"px)")};return this.size&&(t[this.vertical?"height":"width"]=this.trackSize),t},indicatorsCls:function(){return Br.derive("indicators",{vertical:this.vertical})},activeIndicator:function(){return(this.active+this.count)%this.count},count:function(){return this.children.length},size:function(){return this[this.vertical?"height":"width"]},delta:function(){return this.vertical?this.touch.deltaY:this.touch.deltaX},minOffset:function(){return this.rect?(this.vertical?this.rect.height:this.rect.width)-this.size*this.count:0},maxCount:function(){return Math.ceil(Math.abs(this.minOffset)/this.size)},trackSize:function(){return this.size*this.count},isCorrectDirection:function(){return this.touch.direction===(this.vertical?Sn.VER:Sn.HOR)}},watch:{defaultActive:function(t){this.init(t)},count:function(){this.init(this.active)},autoPlay:function(){this.startAutoplay()}},onMounted:function(){this.init()},onActivated:function(){this.init(this.active)},onDeactivated:function(){this.stopAutoplay()},onBeforeUnmount:function(){this.stopAutoplay()},methods:{onTouchStart:function(t){this.swipeable&&(this.touch.start(t),this.touchStartTime=Date.now(),this.stopAutoplay(),this.correctPosition())},onTouchMove:function(t){this.swipeable&&this.swiping&&(this.touch.move(t),this.isCorrectDirection&&(Y.PreventDefault(t,!0),this.move(0,this.delta)))},onTouchEnd:function(t){if(this.swipeable&&this.swiping){var e=Date.now()-this.touchStartTime,i=this.delta/e;if((Math.abs(i)>.25||Math.abs(this.delta)>this.size/2)&&this.isCorrectDirection){var n=this.vertical?this.touch.offsetY:this.touch.offsetX,r=0;r=this.loop?n>0?this.delta>0?-1:1:0:-Math[this.delta>0?"ceil":"floor"](this.delta/this.size),this.move(r,0,!0)}else this.delta&&this.move(0);this.swiping=!1,this.startAutoplay()}},stopAutoplay:function(){clearTimeout(this.autoplayTimer)},startAutoplay:function(){var t=this;this.stopAutoplay(),this.autoplay>0&&this.count>1&&(this.autoplayTimer=setTimeout((function(){t.next(),t.startAutoplay()}),+this.autoplay))},prev:function(){var t=this;this.correctPosition(),this.touch.reset(),Ar((function(){t.swiping=!1,t.move(-1,0,!0)}))},next:function(){var t=this;this.correctPosition(),this.touch.reset(),Ar((function(){t.swiping=!1,t.move(1,0,!0)}))},swipeTo:function(t,e){var i=this;this.correctPosition(),this.touch.reset(),Ar((function(){var n;n=i.loop&&t===i.count?0===i.active?0:t:t%i.count,e.immediate?Ar((function(){i.swiping=!1})):i.swiping=!1,i.move(n-i.active,0,!0)}))},move:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!(this.count<=1)){var n=this.$data.active,r=this.getTargetActive(t),o=this.getTargetOffset(r,e);this.loop&&(this.children[0]&&o!==this.minOffset&&this.children[0].setOffset(o<this.minOffset?this.trackSize:0),this.children[this.count-1]&&0!==o&&this.children[this.count-1].setOffset(o>0?-this.trackSize:0)),this.active=r,this.offset=o,i&&n!==r&&this.$emit("change",this.activeIndicator)}},correctPosition:function(){this.swiping=!0,this.active<=-1?this.move(this.count):this.active>=this.count&&this.move(-this.count)},getTargetActive:function(t){var e=this.$data.active;return t?this.loop?Cn.Clamp(e+t,-1,this.count):Cn.Clamp(e+t,0,this.maxCount):e},getTargetOffset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=t*this.size;this.loop||(i=Math.min(i,this.minOffset));var n=e-i;return this.loop||(n=Cn.Clamp(n,this.minOffset,0)),n},isHide:function(t){if(!t)return!1;var e=window.getComputedStyle(t),i="none"===e.display,n=null===t.offsetParent&&"fixed"!==e.position;return i||n},init:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.defaultActive;if(this.$el){if(!this.isHide(this.$el)){var e={width:this.$el.offsetWidth,height:this.$el.offsetHeight};this.rect=e,this.width=e.width,this.height=e.height}this.count&&(t=Math.min(this.count-1,t)),this.active=t,this.swiping=!0,this.offset=this.getTargetOffset(t),this.children.forEach((function(t){return t.setOffset(0)})),this.startAutoplay()}},resize:function(){this.init(this.active)}},render:function(){var t=this,e=arguments[0],i=function(i,n){var r=n===t.activeIndicator,o={};return r&&(o.backgroundColor=t.indicatorColor),e("i",{style:o,class:Br.derive("indicator",{active:r})})},n=function(){return t.$scopedSlots.indicator?t.$scopedSlots.indicator({active:t.activeIndicator}):t.showIndicator&&t.count>1?e("div",{class:t.indicatorsCls},[Array(t.count).fill(null).map(i)]):void 0};return e("div",{class:this.cls},[e("div",{class:this.trackCls,style:this.trackStyle,on:{touchstart:this.onTouchStart,touchmove:this.onTouchMove,touchend:this.onTouchEnd,touchcancel:this.onTouchEnd}},[this.$slots.default]),n()])}};i(45);k.WithInstall(Yr);var zr=Yr,Nr=C.Create("swiper-item"),Hr={name:Nr.name,mixins:[vr(Br.name)],data:function(){return{offset:0,startTime:-1,touch:wn.Create()}},props:{duration:{type:Number,default:200}},computed:{vertical:function(){return this.$parent.vertical},cls:function(){return Nr.derive()},style:function(){var t={},e=this.parent.vertical;return this.parent.size&&(t[e?"height":"width"]="".concat(this.parent.size,"px")),this.offset&&(t.transform="translate".concat(e?"Y":"X","(").concat(this.offset,"px)")),t},delta:function(){return this.$parent.delta}},methods:{setOffset:function(t){this.offset=t},onTouchStart:function(t){this.touch.start(t),this.startTime=t.timeStamp},onTouchMove:function(t){this.touch.move(t),t.preventDefault()},onTouchEnd:function(t){t.timeStamp-this.startTime<this.duration&&Math.abs(this.delta)<wn.MIN_DISTANCE&&this.$emit("click",t)}},render:function(){var t=arguments[0];return t("div",{class:this.cls,style:this.style,on:{touchmove:this.onTouchMove,touchstart:this.onTouchStart,touchend:this.onTouchEnd}},[this.$slots.default])}};i(46);k.WithInstall(Hr);var Lr=Hr,Xr=C.Create("list"),Fr={name:Xr.name,components:{Loading:X},data:function(){return{scrollParent:null,check:null,distanceY:-1}},props:{loadingText:{type:String},loading:{type:Boolean,default:!1},finished:{type:Boolean,default:!1},finishedText:{type:String,default:"没有更多了"},error:{type:Boolean,default:!1},errorText:{type:String,default:"加载失败,点击重试"},offset:{type:Number,default:50},loadingType:{type:String,default:"spinner"},immediateCheck:{type:Boolean,default:!0},direction:{type:String,default:"up"},laodingType:{type:String,default:"spinner"}},computed:{cls:function(){return Xr.derive()},tipCls:function(){return Xr.derive(["tip"])}},methods:{getElementTop:function(t){return Y.GetBoundingClientRect(t).top+Y.GetScrollTop(window)},checkScroll:function(){var t=this.$el,e=Y.GetBoundingClientRect(this.scrollParent).height,i=Y.GetBoundingClientRect(t).height,n=Y.GetScrollTop(this.scrollParent),r=n+e,o=!1;o=t===this.scrollParent?this.scrollParent.scrollHeight-r<=this.offset&&n>this.distanceY:i-r<=this.offset&&n>this.distanceY,this.distanceY=n,o&&(this.$emit("input",!0),this.$emit("load"))}},mounted:function(){this.scrollParent=Y.GetScrollParent(this.$el),this.check=function(t,e,i){if(1===i)var n=0;else if(2===i)var r;return function(){var o=this,s=arguments;if(1===i){var a=Date.now();a-n>e&&(t.apply(o,s),n=a)}else 2===i&&(r||(r=setTimeout((function(){r=null,t.apply(o,s)}),e)))}}(this.checkScroll,500,2),Y.AddEventListener(this.scrollParent,"scroll",this.check),this.immediateCheck&&this.checkScroll()},destroyed:function(){Y.RemoveEventListener(this.scrollParent,"scroll",this.check)},render:function(){var t=this,e=arguments[0],i=function(){t.$emit("input",!1),t.$emit("load"),t.checkScroll()},n=function(){if(t.loading&&!t.finished)return e("div",[t.$slots.loading?t.$slots.loading:e("p",{class:t.tipCls},[e("mx-loading",{attrs:{type:t.laodingType}},[t.loadingText])])])},r=function(){if(t.finished)return e("div",[t.$slots.finished?t.$slots.finished:e("p",{class:t.tipCls},[t.finishedText])])},o=function(){if(!t.loading&&!t.finished&&!t.error)return e("div",[e("p",{class:t.tipCls},["上拉加载更多"])])},s=function(){if(t.error)return e("div",[t.$slots.error?t.$slots.error:e("p",{class:t.tipCls,on:{click:i}},[t.errorText])])};return e("div",{class:this.cls},[this.$slots.default,o(),n(),r(),s()])}};i(47);k.WithInstall(Fr);var jr=Fr,Rr=C.Create("steps"),$r={name:Rr.name,props:{theme:{type:String,default:"brand"},active:{type:String|Number,default:0},activeColor:{type:String},inactiveColor:{type:String},activeIcon:{type:String},inactiveIcon:{type:String},finishedIcon:{type:String},iconPrefix:{type:String,default:"mx-icon"},isHorizental:{type:Boolean,default:!1},titleFontSize:{type:String|Number}},computed:{cls:function(){return Rr.derive({horizental:this.isHorizental})},containerCls:function(){return Rr.derive("container")}},methods:{onClickStep:function(t){this.$emit("click-step",t)}},render:function(){var t=arguments[0];return t("div",{class:this.cls},[t("div",{class:this.containerCls},[this.$slots.default])])}};i(48);k.WithInstall($r);var Wr=$r,Gr=C.Create("step"),Vr={name:Gr.name,props:{title:{type:String},desc:{type:String},timestamp:{type:String}},computed:{cls:function(){return Gr.derive()},contentCls:function(){return Gr.derive("content")},titleCls:function(){return Gr.derive("title",[(this.isActive||this.isFinished)&&this.$parent.theme])},titleStyle:function(){var t={},e=Number.parseInt(this.$parent.titleFontSize);return Number.isNaN(e)||(t.lineHeight=t.fontSize="".concat(e,"px")),t},descCls:function(){return Gr.derive("desc")},timestampCls:function(){return Gr.derive("timestamp")},iconContainerCls:function(){return Gr.derive("icon-container")},iconCls:function(){return Gr.derive("icon",[(this.isActive||this.isFinished)&&this.$parent.theme,{horizental:this.$parent.isHorizental}])},lineCls:function(){return Gr.derive("line",{horizental:this.$parent.isHorizental})},index:function(){return this.$parent.$children.indexOf(this)},isInactive:function(){return!(this.isActive||this.isFinished)},isActive:function(){return this.$parent.active===this.index},isFinished:function(){return this.$parent.active>this.index},containerStyle:function(){var t={},e=Number.parseInt(this.$parent.titleFontSize);return Number.isNaN(e)||(t.top="".concat(e/2,"px")),t},lineStyle:function(){var t={},e=Number.parseInt(this.$parent.titleFontSize);return Number.isNaN(e)||(t.top="".concat(e/2,"px")),t}},data:function(){return{inited:!1}},mounted:function(){var t=this;this.$nextTick((function(){return t.inited=!0}))},methods:{onClick:function(){var t,e;null===(t=(e=this.$parent).onClickStep)||void 0===t||t.call(e,this.index)}},render:function(){var t=this,e=arguments[0],i=function(){return t.$slots.content?t.$slots.content:[n(),r(),o()]},n=function(){return e("div",{class:t.titleCls,style:t.titleStyle},[t.$slots.default||t.title])},r=function(){return t.$slots.desc?t.$slots.desc:t.desc&&e("div",{class:t.descCls},[t.desc])},o=function(){return t.$slots.timestamp?t.$slots.timestamp:t.timestamp&&e("div",{class:t.timestampCls},[t.timestamp])},s=function(){var i=t.$parent.$props,n=i.activeIcon,r=i.inactiveIcon,o=i.finishedIcon,s=i.activeColor,a=i.inActiveColor,l=i.iconPrefix,c=i.theme;return t.isInactive&&r?e(A,{attrs:{name:r,color:a,"class-prefix":l,size:"10"}}):t.isActive&&n?e(A,{attrs:{name:n,theme:c,color:s,"class-prefix":l,size:"10"}}):t.isFinished&&o?e(A,{attrs:{name:o,theme:c,color:s,"class-prefix":l,size:"10"}}):e("div",{class:t.iconCls})};return e("div",{class:this.cls,on:{click:this.onClick}},[e("div",{class:this.contentCls},[i()]),e("div",{class:this.iconContainerCls,style:this.containerStyle},[s()]),e("div",{class:this.lineCls,style:this.lineStyle})])}};i(49);k.WithInstall(Vr);var qr=Vr,Ur=i(60),Kr=i.n(Ur);function Zr(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function Qr(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Zr(Object(i),!0).forEach((function(e){r()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Zr(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Jr(){return{props:{axis:{type:Object},geometry:{type:Object,required:!0},data:{type:Array|Object,required:!0},width:{type:Number},height:{type:Number},showTag:{type:Boolean,default:!1}},data:function(){return{chart:null}},computed:{isUsingYR:function(){return Array.isArray(this.data[0])}},watch:{axis:function(){this.repaint()},geometry:function(){this.repaint()},showTag:function(){this.repaint()},width:function(t){this.chart.changeSize(t,null)},height:function(t){this.chart.changeSize(null,t)},data:function(){this.changeSource()}},mounted:function(){this.initChart(),this.renderCoord(),this.renderAxis(),this.renderScale(),this.renderTooltip(),this.renderLegend(),this.renderGuide(),this.renderSource(),this.renderGeometry(),this.chart.render(),this.useInteraction()},beforeDestory:function(){this.chart.destory()},methods:{initChart:function(){this.chart=new Kr.a.Chart({el:this.getCanvas(),width:this.width,height:this.height,pixelRatio:window.devicePixelRatio})},renderCoord:function(){},renderAxis:function(){this.chart.axis(this.getAxisOption())},renderScale:function(){var t=this.axis,e=t.x,i=t.y,n=t.yr;e.scale&&this.chart.scale(e.use,e.scale),i.scale&&this.chart.scale(i.use,i.scale),n&&n.scale&&this.chart.scale(n.use,n.scale)},renderTooltip:function(){this.chart.tooltip(this.getTooltipOption())},renderLegend:function(){this.chart.legend({align:"center",marker:{radius:4},nameStyle:{fill:"#8A8A8F",fontSize:12},valueStyle:{fill:"#8A8A8F",fontSize:12}})},renderGuide:function(){var t=this;if(this.showTag){var e=this.data.flat(),i=this.axis,n=i.x,r=i.y,o=i.yr;this.geometry.classifyBy;e.forEach((function(e){var i,s,a=[e[n.use],null!==(i=e[r.use])&&void 0!==i?i:e[o.use]],l=null!==(s=e[r.use])&&void 0!==s?s:e[o.use];t.chart.guide().text(t.getGuideTextOption(a,l))}))}},renderSource:function(){this.chart.source(this.data.flat())},renderGeometry:function(){},useInteraction:function(){},changeSource:function(){this.chart.changeSource(this.data.flat())},repaint:function(){this.chart.clear(),this.renderCoord(),this.renderAxis(),this.renderScale(),this.renderTooltip(),this.renderLegend(),this.renderGuide(),this.renderSource(),this.renderGeometry(),this.chart.repaint()},getCanvas:function(){return this.$el},getAxisOption:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e={},i=this.axis,n=i.x,r=i.y,o=i.yr;return n&&(e[n.use]=t?this.getAxisYOption():this.getAxisXOption()),r&&(e[r.use]=t?this.getAxisXOption():this.getAxisYOption()),o&&(e[o.use]=this.getAxisYOption((function(t){return t.positon="right"}))),e},getAxisXOption:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(t){return t},e={label:{fill:"#8A8A8F",fontSize:12}};return t(e),e},getAxisYOption:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(t){return t},e={label:{fill:"#C7C7CC",fontSize:10},grid:{stroke:"#F2F2F2",lineWidth:1,lineDash:0}};return t(e),e},getTooltipOption:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i={showCrosshairs:e,crosshairsStyle:{stroke:"#C7C7CC",lineWidth:1,lineDash:[3,1.2]},background:{fill:"#FFFFFF",radius:15,padding:[8,25],shadowOffsetX:0,shadowOffsetY:2,shadowBlur:8,shadowColor:"rgba(0,0,0,0.1)"},nameStyle:{fill:"#666666",fontSize:13,fontFamily:"PingFangSC-Medium",fontWeight:500},valueStyle:{fill:"#666666",fontSize:13,fontFamily:"PingFangSC-Medium",fontWeight:500}};return this.geometry.classifyBy&&(i.custom=!0,i.onChange=function(e){var i,n=null===(i=t.chart.get("legendController").legends.top)||void 0===i?void 0:i[0];if(n){var r=e.items,o=n.items,s={};o.forEach((function(t){s[t.name]=Qr({},t)})),r.forEach((function(t){var e=t.name,i=t.value;s[e]&&(s[e].value=i)})),null==n||n.setItems(Object.values(s))}},i.onHide=function(){var e,i=null===(e=t.chart.get("legendController").legends.top)||void 0===e?void 0:e[0];null==i||i.setItems(t.chart.getLegendItems().country)}),i},getGuideTextOption:function(t,e){return{position:t,content:e,style:{fill:"#666666",fontSize:9},offsetY:-8}},getLinearColor:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:90;return Array.isArray(t)?t.map((function(t){return"l(".concat(e,") 0:").concat(t,"FF 1:").concat(t,"00")})):"l(".concat(e,") 0:").concat(t,"FF 1:").concat(t,"00")}}}}var to=C.Create("chart-line"),eo={name:to.name,mixins:[Jr()],props:{showArea:{type:Boolean,default:!1}},computed:{cls:function(){return to.derive()}},methods:{renderTooltip:function(){this.chart.tooltip(this.getTooltipOption(!0))},renderGeometry:function(){var t=this,e=this.axis,i=e.x,n=e.y,r=e.yr,o=this.geometry,s=o.classifyBy,a=o.color,l=this.isUsingYR?this.data:[this.data];l.forEach((function(e,o){var c=[i.use,t.isUsingYR&&o===l.length-1?null==r?void 0:r.use:n.use],h=t.chart.line();if(h.position(c),h.shape("smooth"),s?h.color(s,a):h.color(a),t.showArea){var u=t.chart.area();u.position(c),u.shape("smooth"),s?u.color(s,t.getLinearColor(a)):u.color(t.getLinearColor(a))}}))}},render:function(){var t=arguments[0];return t("canvas",{class:this.cls})}};i(50);k.WithInstall(eo);var io=eo,no=C.Create("chart-column"),ro={name:no.name,mixins:[Jr()],props:{showHorizental:{type:Boolean,default:!1}},computed:{cls:function(){return no.derive()}},methods:{renderAxis:function(){this.chart.axis(this.getAxisOption(!0))},renderGeometry:function(){var t=this,e=this.axis,i=e.x,n=e.y,r=e.yr,o=this.geometry,s=o.classifyBy,a=o.color,l=this.isUsingYR?this.data:[this.data];l.forEach((function(e,o){var c=[i.use,t.isUsingYR&&o===l.length-1?null==r?void 0:r.use:n.use],h=t.chart.interval();h.position(c),h.shape("smooth"),h.adjust("stack"),s?h.color(s,a):h.color(a)}))},renderCoord:function(){this.showHorizental&&this.chart.coord({transposed:!0})}},render:function(){var t=arguments[0];return t("canvas",{class:this.cls})}};i(51);k.WithInstall(ro);var oo=ro,so=C.Create("chart-pie"),ao={name:so.name,mixins:[Jr()],props:{showRing:{type:Boolean,default:!1}},computed:{wrapperCls:function(){return so.derive("wrapper")},cls:function(){return so.derive()},innerCls:function(){return so.derive("inner")},formatedData:function(){var t=this;return Object.keys(this.data).map((function(e){return{key:e,y:t.data[e],x:"1"}}))}},methods:{renderCoord:function(){var t={transposed:!0};this.showRing&&(t.innerRadius=.8),this.chart.coord("polar",t)},renderAxis:function(){this.chart.axis(!1)},renderScale:function(){this.chart.scale(!1)},renderTooltip:function(){this.chart.tooltip(!1)},renderLegend:function(){var t=this;this.chart.legend({itemFormatter:function(e){return"".concat(e,"  ").concat(t.data[e])}})},renderSource:function(){this.chart.source(this.formatedData)},renderGeometry:function(){var t=this.geometry.color,e=this.chart.interval();e.position(["x","y"]),e.color("key",t),e.adjust("stack"),e.style({lineWidth:5,stroke:"#fff",lineJoin:"round",lineCap:"round"})},changeSource:function(){this.chart.changeSource(this.formatedData)},getCanvas:function(){return this.$refs.canvas}},render:function(){var t=this,e=arguments[0],i=function(){if(t.showRing)return e("div",{class:t.innerCls},[t.$slots.default])};return e("div",{class:this.wrapperCls},[e("canvas",{ref:"canvas",class:this.cls}),i()])}};i(52);k.WithInstall(ao);var lo=ao,co=C.Create("sticky"),ho={name:co.name,props:{position:{type:String,default:"top"},zIndex:{type:Number|String,default:1060},offset:{type:Number,default:0},container:{type:Node}},data:function(){return{fixed:!1,width:0,height:0,transform:0,scrollParent:null}},computed:{rootStyle:function(){if(this.fixed)return{width:"".concat(this.width,"px"),height:"".concat(this.height,"px")}},cls:function(){return co.derive({fixed:this.fixed})},style:function(){if(this.fixed){var t=r()({zIndex:this.zIndex,width:"".concat(this.width,"px"),height:"".concat(this.height,"px")},this.position,"".concat(this.offset,"px"));return this.transform&&(t.transform="translate3d(0,".concat(this.transform,"px,0)")),t}}},mounted:function(){this.scrollParent=Y.GetScrollParent(this.$el),Y.AddEventListener(this.scrollParent,"scroll",this.onScroll)},beforeDestory:function(){Y.RemoveEventListener(this.scrollParent,"scroll",this.onScroll)},methods:{onScroll:function(t){var e=this.$props,i=e.position,n=e.container,r=Y.GetBoundingClientRect(this.$el);if(this.width=r.width,this.height=r.height,"top"===i)if(n){var o=Y.GetBoundingClientRect(n);this.fixed=this.offset>r.top&&o.bottom>0;var s=o.bottom-this.offset-this.height;this.transform=s<0?s:0}else this.fixed=this.offset>r.top;else{var a=document.documentElement.clientHeight;if(n){var l=Y.GetBoundingClientRect(n);this.fixed=a-this.offset<r.bottom&&a>l.top;var c=a-l.top-this.height-this.offset;this.transform=c<0?-c:0}else this.fixed=a-this.offset<r.bottom}this.$emit("scroll",{scrollTop:Y.GetScrollTop(this.scrollParent),isFixed:this.fixed})}},render:function(){var t=arguments[0];return t("div",{style:this.rootStyle},[t("div",{class:this.cls,style:this.style},[this.$slots.default])])}};i(53);k.WithInstall(ho);var uo=ho,fo=function(){function t(){y()(this,t)}return b()(t,null,[{key:"Toggle",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(t,e){return t===e},n=t.slice(),r=n.findIndex((function(t){return i(t,e)}));return-1!=r?n.splice(r,1):n.push(e),n}}]),t}(),po=C.Create("collapse"),go={name:po.name,props:{accordion:{type:Boolean,default:!1},value:{type:[Number,String,Array],default:function(){return[]}}},model:{prop:"value",event:"change"},data:function(){return{innerValue:this.value}},computed:{cls:function(){return po.derive()}},watch:{value:function(t){this.innerValue=t}},methods:{setActive:function(t){this.$emit("change",t)},handleItemClick:function(t){this.accordion?this.innerValue=this.innerValue==t?"":t:this.innerValue=fo.Toggle(this.innerValue,t),this.setActive(this.innerValue)}},render:function(){var t=arguments[0];return t("div",{class:this.cls},[this.$slots.default])}};i(54);k.WithInstall(go);var vo=go,mo=C.Create("collapse-item"),yo={name:mo.name,components:{Icon:A},props:{title:{type:String},name:{type:[String,Number],default:""},value:{type:Number,default:0}},data:function(){return{height:""}},computed:{cls:function(){return mo.derive({active:this.isActive})},headerCls:function(){return mo.derive("header")},headerTitleCls:function(){return mo.derive("header-title")},contentCls:function(){return mo.derive("content")},iconCls:function(){return mo.derive("icon",{active:this.isActive})},contentStyle:function(){var t={};return this.isActive?t.height="".concat(this.height,"px"):t.height="0px",t},key:function(){return this.name||this.$parent.$children.indexOf(this).toString()},isActive:function(){var t=this,e=this.$parent.$data.innerValue;return this.$parent.accordion?e===this.key:-1!=(null==e?void 0:e.findIndex((function(e){return e===t.key})))}},mounted:function(){this.height=this.$refs.collapseItemContentRef.offsetHeight},methods:{handleItemClick:function(){this.$parent.handleItemClick(this.key)}},render:function(){var t=this,e=arguments[0],i=function(){return e("div",{class:t.headerCls,on:{click:t.handleItemClick}},[n(),e(A,{class:t.iconCls,attrs:{name:"arrow-down",size:10}})])},n=function(){return t.$slots.title?t.$slots.title:e("div",{class:t.headerTitleCls},[t.title])},r=function(){return e("div",{class:t.contentCls,style:t.contentStyle},[e("div",{ref:"collapseItemContentRef"},[t.$slots.default])])};return e("div",{class:this.cls},[i(),r()])}};i(55);function xo(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function bo(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?xo(Object(i),!0).forEach((function(e){r()(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):xo(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}k.WithInstall(yo);var So={Icon:B,Switch:H,Button:R,ButtonGroup:G,Popup:Lt,Cell:$t,Tag:qt,NavBar:Vt,NoticeBar:Zt,Overlay:Qt,Modal:ee,Dialog:ae,SearchBar:fe,Empty:ge,ScrollView:bn,Checkbox:En,Radio:Yn,Rate:Hn,Picker:In,PickerColumn:Ln,DateTimePicker:Gn,Badge:Vn,Mask:Kn,ActionSheet:Jn,Toast:or,TabBar:lr,TabBarItem:ur,Tab:gr,TabPane:xr,Catalog:Sr,Slider:Cr,SliderScale:Mr,PullRefresh:Dr,Loading:Or,Swiper:zr,SwiperItem:Lr,List:jr,Steps:Wr,Step:qr,ChartLine:io,ChartColumn:oo,ChartPie:lo,Sticky:uo,Collapse:vo,CollapseItem:yo},wo={},ko={},Co={},To={};s.a.map((function(t){var e=So[t.name];if(e)if("component"==t.type)if(e.name)wo[e.name]=e;else for(var i in e)wo[i]=e[i];else"method"==t.type?ko[t.name]=e:"filter"==t.type?Co[t.name]=e:"directive"==t.type&&(To[t.name]=e)}));var Po=function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t.installed){for(var n in i.locale&&(e.config.lang=i.locale),i.lang&&d(e.config.lang,i.lang),ko)Array.isArray(ko[n])?(e.prototype["$"+n.toLowerCase()]=ko[n][0],e.component(ko[n][1].name,ko[n][1])):e.prototype["$"+n.toLowerCase()]=ko[n];for(var r in wo)wo[r]&&wo[r].name&&e.use(wo[r]);for(var o in Co)Co[o]&&Co[o].name&&e.filter(o,Co[o]);for(var s in To)To[s]&&To[s].name&&e.directive(To[s].name,To[s]);e.use(Et,{lazyComponent:!0,loading:"//img12.360buyimg.com/imagetools/jfs/t1/73967/28/14561/916/5dc142e4E0666555b/bf33454553c6035e.png"})}};"undefined"!=typeof window&&window.Vue&&Po(window.Vue);e.default=bo(bo(bo(bo({version:o.a,locale:d,install:Po,Lazyload:Et},wo),Co),To),ko)}])}));
//# sourceMappingURL=minixui.min.js.map